?? stateequation.m
字號:
function derivativeofstate=stateequation(t,state,control)
global J1 J2 J3
sita1=state(1);
sita2=state(2);
sita3=state(3);
w1=state(4);
w2=state(5);
w3=state(6);
L1=control(1);
L2=control(2);
L3=control(3);
%------------
sita1dot=w1-w2*cos(sita1)*tan(sita3)+w3*sin(sita1)*tan(sita3);
sita2dot=w2*cos(sita1)/cos(sita3)-w3*sin(sita1)/cos(sita3);
sita3dot=w2*sin(sita1)+w3*cos(sita1);
w1dot=(J2-J3)/J1*w2*w3+L1/J1;
w2dot=(J3-J1)/J2*w1*w2+L2/J2;
w3dot=(J1-J2)/J3*w1*w2+L3/J3;
derivativeofstate=[sita1dot;sita2dot;sita3dot;w1dot;w2dot;w3dot];
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -