calculate the integral of sin of x

1 回表示 (過去 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 件のコメント
dibyendu sen
dibyendu sen 2019 年 3 月 23 日
Thank you

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeOil, Gas & Petrochemical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by