SUNYANAN 发表于 2006-11-2 19:02

矩阵运算的问题?

A=2;
B=linspace(0.01,1,120);
r=1;
M=1+log(1+1/tanh(pi*B/2))/log(2);
N=1+log(1+tanh(pi*B/2))/log(2);
H=2*log(2);
Zoe=30*pi/(sqrt(r)*(A+H*N/(2*pi)));
Zoo=30*pi/(sqrt(r)*(A+H*M/(2*pi)));
x=sqrt(r)*Zoo;y=sqrt(r)*Zoe;
plot(x,y,);hold on;

程序运行时老是这样报错:
??? Error using ==> mrdivide
Matrix dimensions must agree.
请高手指点,是因为矩阵运算加"."的问题吗?
如何改进?
:@)小弟在此先表示感谢!!!

jimin 发表于 2006-11-2 19:19

A=2;
B=linspace(0.01,1,120);
r=1;
M=1+log(1+1./tanh(pi*B/2))/log(2);
N=1+log(1+tanh(pi*B/2))/log(2);
H=2*log(2);
Zoe=30*pi./(sqrt(r).*(A+H*N/(2*pi)));
Zoo=30*pi./(sqrt(r).*(A+H*M/(2*pi)));
x=sqrt(r).*Zoo;y=sqrt(r).*Zoe;
plot(x,y);

lxq 发表于 2006-11-2 23:30

呵呵 是点乘和乘的区别
页: [1]
查看完整版本: 矩阵运算的问题?