这样是否保证了矩阵的大小肯定会一样
我有这样一段程序,DmZ=zeros(1,N+1);
Int1z=zeros(N+1,1);
=Dm(A,B,N,1);
for j=1:N+1
m=j-1;
%I1=double(int(x^m*cos(alpha*x),x,-1,1));
%I2=double(int(x^m*sin(alpha*x),x,-1,1));
I1=0.2;
I2=0.2;
Int1z(j,1)=cos(beta)*I1-sin(beta)*I2;
end
I1z=DmZ*Int1z;
I1Z=I1Z+I1z;
可是运行是总是出现这样的错误提示:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> intI1_back at 57
I1z=DmZ*Int1z;
我定义了DmZ和Int1z为1*9的矩阵为何老是出现这样的错误呢?请高手指点!谢谢 矩阵相乘
还是矩阵元素想乘
页:
[1]