1.各桿在第1~5秒內方向如下圖
第一秒

第二秒

第三秒

第四秒

第五秒

2.
第一桿的速度

第一桿的加速度

第二桿的速度

第二桿的加速度

第三桿的速度

第三桿的加速度

3.利用function avifile製作成影片影片
以下是這次用的程式
function dyad_run(rho,theta,td,tdd,time);
set(gca,'xlim',[0 100],'ylim',[0 100],...'NextPlot','replace','Visible','off');
thetaT=theta;tdT=td;
thetaTEMP=theta;
mov = avifile('run.avi');
for n=1:length(time);
for m=1:length(rho):td;
T(m)=td(m)+tdd(m)*(n-1);
thetaT(m)=theta(m)+td(m)*(n-1)+0.5*tdd(m)*(n-1)^2;
end;
[v,a]=dyad_draw(rho,thetaT,tdT,tdd);
if n > 1
for k=1:length(rho)vv(k,n-1)=v(k);aa(k,n-1)=a(k);
end;
end;
pause(1);
F = getframe(gca);
mov = addframe(mov,F);
end;
mov = close(mov);
沒有留言:
張貼留言