matlab编写问题我想同时在程序中进行函数求导,并且循环计算,并把数据打出.自己设计的程序如下:clear;syms t;L1=12.195;L2=45.825;L3=29;L4=34;L5=59.5725;b1=40;b2=120;b3=144;a=subs('230*2*pi*t/60'); X1=subs('-L4*sin((b3
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/22 01:50:09
matlab编写问题我想同时在程序中进行函数求导,并且循环计算,并把数据打出.自己设计的程序如下:clear;syms t;L1=12.195;L2=45.825;L3=29;L4=34;L5=59.5725;b1=40;b2=120;b3=144;a=subs('230*2*pi*t/60'); X1=subs('-L4*sin((b3
matlab编写问题
我想同时在程序中进行函数求导,并且循环计算,并把数据打出.自己设计的程序如下:
clear;
syms t;
L1=12.195;L2=45.825;L3=29;L4=34;L5=59.5725;b1=40;b2=120;b3=144;
a=subs('230*2*pi*t/60');
X1=subs('-L4*sin((b3)/180*pi)+L1*cos((b3-a)/180*pi)');
Y1=subs('L1*sin((b3-a)/180*pi)+L4*cos((b3)/180*pi)');
Z1=subs('L1^2+L3^2+L4^2-L2^2-2*L1*L4*sin((a)/180*pi)');
b=subs('acos(Z1/(2*L3*sqrt(X1^2+Y1^2)))-atan(Y1/X1)');
X2=subs('-L1*sin((a)/180*pi)+L4');
Y2=subs('L1*cos((a)/180*pi)');
Z2=subs('L1^2+L2^2+L4^2-L3^2-2*L1*L4*sin((a)/180*pi)');
c=subs('acos(Z2/(2*L2*sqrt(X2^2+Y2^2)))-atan(Y2/X2)');
Xe=subs(L3*cos(b)-L4*sin((b3)/180*pi)-L5*sin((b2-b3)/180*pi-c));
Ye=subs(L3*sin(b)-L4*cos((b3)/180*pi)+L5*cos((b2-b3)/180*pi-c));
Vex=diff(Xe);
Vey=diff(Ye);
Ve=subs(sqrt(Vex^2+Vey^2));
for i=[0:10:360];
x=i;
c=subs('x');
t=subs('x/(230*2*pi/60)');
plot(subs(c),subs(Ve));
fptint('x=%5.4f,Xe=%5.4f;Ye=%5.4f\n,Ve=%5.4f',subs(x),subs(Xe),subs(Ye),subs(Ve))
hold on;
end
出现Undefined function 'fptint' for input arguments of type 'sym'.
需要哪里改进?
应打成fprintf,但还是不行.
matlab编写问题我想同时在程序中进行函数求导,并且循环计算,并把数据打出.自己设计的程序如下:clear;syms t;L1=12.195;L2=45.825;L3=29;L4=34;L5=59.5725;b1=40;b2=120;b3=144;a=subs('230*2*pi*t/60'); X1=subs('-L4*sin((b3
试试把fprintf里的subs(x)都改成double(subs(x)),以此类推、