关于用MATLAB求加速度,l1=200;l2=4.28*l1;l21=4.86*l1;l3=2.14*l1;xe=4.24*l1;ye=1.66*l1;p=0.7415*pi;t=0:0.01:2;xb=200*cos(10*t);yb=200*sin(10*t);c=(ye-yb).^2+(xe-xb).^2;w2=acos((l2^2+c-l3^2)/(2*l2*sqrt(c)))+atan((ye-yb)./(xe-xb));xc=xb+l2*cos(w2);
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/27 23:38:52
![关于用MATLAB求加速度,l1=200;l2=4.28*l1;l21=4.86*l1;l3=2.14*l1;xe=4.24*l1;ye=1.66*l1;p=0.7415*pi;t=0:0.01:2;xb=200*cos(10*t);yb=200*sin(10*t);c=(ye-yb).^2+(xe-xb).^2;w2=acos((l2^2+c-l3^2)/(2*l2*sqrt(c)))+atan((ye-yb)./(xe-xb));xc=xb+l2*cos(w2);](/uploads/image/z/9796279-31-9.jpg?t=%E5%85%B3%E4%BA%8E%E7%94%A8MATLAB%E6%B1%82%E5%8A%A0%E9%80%9F%E5%BA%A6%2Cl1%3D200%3Bl2%3D4.28%2Al1%3Bl21%3D4.86%2Al1%3Bl3%3D2.14%2Al1%3Bxe%3D4.24%2Al1%3Bye%3D1.66%2Al1%3Bp%3D0.7415%2Api%3Bt%3D0%3A0.01%3A2%3Bxb%3D200%2Acos%2810%2At%29%3Byb%3D200%2Asin%2810%2At%29%3Bc%3D%28ye-yb%29.%5E2%2B%28xe-xb%29.%5E2%3Bw2%3Dacos%28%28l2%5E2%2Bc-l3%5E2%29%2F%282%2Al2%2Asqrt%28c%29%29%29%2Batan%28%28ye-yb%29.%2F%28xe-xb%29%29%3Bxc%3Dxb%2Bl2%2Acos%28w2%29%3B)
关于用MATLAB求加速度,l1=200;l2=4.28*l1;l21=4.86*l1;l3=2.14*l1;xe=4.24*l1;ye=1.66*l1;p=0.7415*pi;t=0:0.01:2;xb=200*cos(10*t);yb=200*sin(10*t);c=(ye-yb).^2+(xe-xb).^2;w2=acos((l2^2+c-l3^2)/(2*l2*sqrt(c)))+atan((ye-yb)./(xe-xb));xc=xb+l2*cos(w2);
关于用MATLAB求加速度,
l1=200;
l2=4.28*l1;
l21=4.86*l1;
l3=2.14*l1;
xe=4.24*l1;
ye=1.66*l1;
p=0.7415*pi;
t=0:0.01:2;
xb=200*cos(10*t);
yb=200*sin(10*t);
c=(ye-yb).^2+(xe-xb).^2;
w2=acos((l2^2+c-l3^2)/(2*l2*sqrt(c)))+atan((ye-yb)./(xe-xb));
xc=xb+l2*cos(w2);
yc=yb+l2*sin(w2);
xd=xc-l21*cos(w2+p);
yd=yc-l21*sin(w2+p);
subplot(2,2,1);
plot(xd,yd),grid on
title('点D的轨迹图像')
xlabel('xd/mm'),ylabel('yd/mm')
subplot(2,2,2);
plot(t,xd),grid on
title('构件5的位移图像')
xlabel('t/s'),ylabel('位移/mm')
v=diff(xd);
subplot(2,2,3);
plot(t(1:end-1),v),grid on
title('构件5的速度图像')
xlabel('t/s'),ylabel('速度/(mm/s)')
a=diff(v);
subplot(2,2,4);
plot(t(1:end-1),a),grid on
title('构件5的加速度图像')
xlabel('t/s'),ylabel('加速度/(mm/s^2)')
关于用MATLAB求加速度,l1=200;l2=4.28*l1;l21=4.86*l1;l3=2.14*l1;xe=4.24*l1;ye=1.66*l1;p=0.7415*pi;t=0:0.01:2;xb=200*cos(10*t);yb=200*sin(10*t);c=(ye-yb).^2+(xe-xb).^2;w2=acos((l2^2+c-l3^2)/(2*l2*sqrt(c)))+atan((ye-yb)./(xe-xb));xc=xb+l2*cos(w2);
问题在于你的t(1:end-1)是200个数,而a是199个数,两个向量长度不一样,应该为plot(t(2:end-1),a),grid on