|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
大家好啊!我用ode45求微分方程,想叫画出加速度的曲线,不知道咋办?我用下面的办法输出的结果位移、速度都对, 但是加速度不对,不知道咋办!麻烦饿!
q_=[y(:,8),y(:,10),y(:,12)]; %各广义坐标的位移
dq_=[y(:,9),y(:,11),y(:,13)]; %各广义坐标的速度
D2q_=[diff(y(:,9)),diff(y(:,11)),diff(y(:,13))];[n,m]=size(D2q_);D2q_(n+1,:)=D2q_(n,:);%加速度
figure;plot(t,dq_(:,1));
figure;plot(t,dq_(:,2));
figure;plot(t,dq_(:,3));
figure; plot(t,D2q_(:,1));
figure; plot(t,D2q_(:,2));
figure; plot(t,D2q_(:,3)); |
|