calculate the integral of sin of x

3 visualizaciones (últimos 30 días)
Danilo NASCIMENTO
Danilo NASCIMENTO el 30 de En. de 2014
Comentada: dibyendu sen el 23 de Mzo. de 2019
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?

Respuesta aceptada

A Jenkins
A Jenkins el 30 de En. de 2014
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.

Más respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 30 de En. de 2014
The integral of sin(x) is -cos(x).

Categorías

Más información sobre Oil, Gas & Petrochemical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by