function discrete Time-integrate with a variable

Hello,
I wanna to integrate a function with a variable.
E.g. f(x) = sin(10-x)
But i dont know how i can do it when i have a variable.
Can u guys help me???
THX

1 commentaire

Zhang lu
Zhang lu le 6 Sep 2013
Modifié(e) : Zhang lu le 6 Sep 2013
Do u mean ?
syms x
f='sin(10-x*a)';
int(f,x,0,5)

Connectez-vous pour commenter.

Réponses (1)

Roger Stafford
Roger Stafford le 6 Sep 2013

0 votes

For functions which are only known at discrete points, use matlab's 'trapz' function.

1 commentaire

sia
sia le 7 Sep 2013
But i wanna integrate it in simulink. Is there a block to do it???

Connectez-vous pour commenter.

Catégories

En savoir plus sur Modeling dans Centre d'aide et File Exchange

Question posée :

sia
le 6 Sep 2013

Community Treasure Hunt

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

Start Hunting!

Translated by