Borrar filtros
Borrar filtros

code/solution for integration with respect in time in matlab

2 visualizaciones (últimos 30 días)
siti khadijah
siti khadijah el 24 de Mayo de 2016
Respondida: Steven Lord el 24 de Mayo de 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

Respuestas (1)

Steven Lord
Steven Lord el 24 de Mayo de 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.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by