Effacer les filtres
Effacer les filtres

code/solution for integration with respect in time in matlab

2 vues (au cours des 30 derniers jours)
siti khadijah
siti khadijah le 24 Mai 2016
Hai fellow friends,
I have a question regarding the integration with respect to time. I have a simple equation as follow:
tau = theta1_dd(t)*((m1 + m2)*L1^2 + I1) + L1*g*sin(theta1(t))*(m1 + m2) + L1*L2*m2*theta2_dd(t)*cos(theta1(t) - theta2(t)) + L1*L2*m2*sin(theta1(t) - theta2(t))*theta2_d(t)
theta2_dd(t)*(m2*L2^2 + I2) + L2*g*m2*sin(theta2(t)) + L1*L2*m2*theta1_dd(t)*cos(theta1(t) - theta2(t)) - L1*L2*m2*sin(theta1(t) - theta2(t))*theta1_d(t)
I tried using int (tau). However, the result was integrated with thetas' not with time. Could anyone here help me regarding this issue? thanks :)
Regards, Siti

Réponses (1)

Steven Lord
Steven Lord le 24 Mai 2016
"int(expr,var) computes the indefinite integral of expr with respect to the symbolic scalar variable var. Specifying the variable var is optional. If you do not specify it, int uses the default variable determined by symvar."
So specify var, the variable with which you want expr to be integrated, in your int call.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by