作业帮 > 综合 > 作业

MATLAB 小白syms t;XB(t)=cos(10*t);YB(t)=sin(10*t);XD=-258*cos(

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/29 12:50:43
MATLAB 小白
syms t;
XB(t)=cos(10*t);
YB(t)=sin(10*t);
XD=-258*cos(atan((258^2+514^2-384^2)/2*514*384));
YD=258*sin(atan((258^2+514^2-384^2)/2*514*384));
CanA1(t)=2*200*(XD-XB(t));%The first RRR;
CanB1(t)=2*200*(YD-YB(t));
CanC1(t)=200^2+(XD-XB(t))^2+(YD-YD(t))^2-200^2;
SQRT1(t)=sqrt(CanA1(t)^2+CanB1(t)^2-CanC1(t)^2);
JiaoB(t)=2*atan((CanB1(t)-SQRT1(t)/(CanA1(t)+CanC1(t)));
ezplot(JiaoB(t))
错误
The following error occurred converting from sym to double:
Error using mupadmex
Error in MuPAD command:DOUBLE cannot convert the input expression into a double
array.
If the input expression contains a symbolic variable,use the VPA function
instead.小白求大神更正
你写的,确实存在比较多的错误,给你改了下,可以运行.希望能帮到你clearsyms t;XB_t=cos(10*t);YB_t=sin(10*t);XD=-258*cos(atan((258^2+514^2-384^2)/2*514*384));YD=258*sin(atan((258^2+514^2-384^2)/2*514*384));CanA1_t=2*200*(XD-XB_t);%The first RRR;CanB1_t=2*200*(YD-YB_t);CanC1_t=200^2+(XD-XB_t)^2+(YD-YB_t)^2-200^2;%应该为YB?SQRT1_t=sqrt(CanA1_t^2+CanB1_t^2-CanC1_t^2);JiaoB_t=2*atan((CanB1_t-SQRT1_t/(CanA1_t+CanC1_t)));FJiaoB_t=inline(JiaoB_t);ezplot(JiaoB_t,[-1,1])