calculate the integral of sin of x

조회 수: 3 (최근 30일)
Danilo NASCIMENTO
Danilo NASCIMENTO 2014년 1월 30일
댓글: dibyendu sen 2019년 3월 23일
When I use a integrator in simulink to determine the integral of a sine function that should give to me a -cos(x), instead, it gives me -cos(x) with a bias of +1, why of this?

채택된 답변

A Jenkins
A Jenkins 2014년 1월 30일
No, the integral of sin(x) is -cos(x)+C. Now you must solve for C.
If you double click your integrator you will see that you have set your initial condition, y(0) by default to be 0. That is, y(0)=0=-cos(0)+C, so C=1.
If you would like the offset, C, to be zero, then you need to change your equation so that y(0)=-cos(0)+0, therefore y(0)=-1. Double click your integrator block and enter -1 instead of zero for the intial condition.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 30일
The integral of sin(x) is -cos(x).
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 30일
Danilo commented
I already discovered.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Oil, Gas & Petrochemical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by