niuwang 发表于 2009-5-17 11:02

出错求助

t=0:0.001:2*pi;
w=0.05;a=pi/3;
x=(sin(pi/10)*sin(pi/10)*sin(w*t)*cos(w*sin(pi/10)*sin(pi/10).*t)-(cos(pi/10)*cos(pi/10)+sin(pi/10)*sin(pi/10)*cos(w*t))*sin(w*sin(pi/10)*sin(pi/10).*t))*cos(a);y=(cos(pi/10)*cos(pi/10)+sin(pi/10)*sin(pi/10)*cos(w*t))*cos(w*sin(pi/10)*sin(pi/10).*t)+sin(pi/10)*sin(pi/10)*sin(w*t)*sin(w*sin(pi/10)*sin(pi/10).*t);m=atan(x/y);plot(t,m,'r')
??? Error using ==> mtimes
Inner matrix dimensions must agree.

ChaChing 发表于 2009-5-17 12:29

回复 楼主 niuwang 的帖子

试试将*改为.*
并看下本版精华贴

niuwang 发表于 2009-5-17 13:14

:handshake 非常感谢,刚开始用不懂得太多
页: [1]
查看完整版本: 出错求助