필터 지우기
필터 지우기

code/solution for integration with respect in time in matlab

조회 수: 2 (최근 30일)
siti khadijah
siti khadijah 2016년 5월 24일
답변: Steven Lord 2016년 5월 24일
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

답변 (1개)

Steven Lord
Steven Lord 2016년 5월 24일
"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.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by