有一段MATLAB画曲线程序
m1=1
n1=0
p1=-1
m2=0
n2=1
p2=-1
h=5
D=-5
t=(0:0.01:1)
a =cos(240*pi*t)
b =sin(240*pi*t)
c=sin(240*pi*t)
x1 =(-2*a*(c+D)/(1+b^2+a^2)*p1*c-2*a*(c+D)/(1+b^2+a^2)*p1*D-2*a*(c+D)/(1+b^2+a^2)*n1*b*h+2*a*(c+D)/(1+b^2+a^2)*p1*h-2*a^2*(c+D)/(1+b^2+a^2)*m1*h+m1*c*h-m1*c*(2*c+2*D)/(1+b^2+a^2)+m1*D*h-m1*D*(2*c+2*D)/(1+b^2+a^2))/((2*c+2*D)/(1+b^2+a^2)*n1*b-(2*c+2*D)/(1+b^2+a^2)*p1+(2*c+2*D)/(1+b^2+a^2)*a*m1+p1*c+p1*D)
plot(t,x1)
运行之后提示如下错误:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> Untitled9 at 13
x1 =(-2*a*(c+D)/(1+b^2+a^2)*p1*c-2*a*(c+D)/(1+b^2+a^2)*p1*D-2*a*(c+D)/(1+b^2+a^2)*n1*b*h+2*a*(c+D)/(1+b^2+a^2)*p1*h-2*a^2*(c+D)/(1+b^2+a^2)*m1*h+m1*c*h-m1*c*(2*c+2*D)/(1+b^2+a^2)+m1*D*h-m1*D*(2*c+2*D
应该没什么错误啊
怎么就画不出来曲线啊?
请高手指教,非常着急,现在都凌晨3点了,我不睡了,在线等
[此贴子已经被作者于2006-5-4 3:41:29编辑过]