matlab--?Error using ==> mtimes Inner matrix dimensions must agree.x=[ones(1,10) zeros(1,41)];n=1:50;k=-25:25;W=(pi/12.5)*k;f=(1/25)*k*1000;X=x*(exp(-j*pi/12.5)).^(n'*k);magX=abs(X);subplot(3,2,2);stem(x);title('输入信号x[n]');subplot(3,2,3);stem

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 13:20:03
matlab--?Errorusing==>mtimesInnermatrixdimensionsmustagree.x=[ones(1,10)zeros(1,41)];n=1:50;k=-25:25

matlab--?Error using ==> mtimes Inner matrix dimensions must agree.x=[ones(1,10) zeros(1,41)];n=1:50;k=-25:25;W=(pi/12.5)*k;f=(1/25)*k*1000;X=x*(exp(-j*pi/12.5)).^(n'*k);magX=abs(X);subplot(3,2,2);stem(x);title('输入信号x[n]');subplot(3,2,3);stem
matlab--?Error using ==> mtimes Inner matrix dimensions must agree.
x=[ones(1,10) zeros(1,41)];
n=1:50;k=-25:25;W=(pi/12.5)*k;f=(1/25)*k*1000;
X=x*(exp(-j*pi/12.5)).^(n'*k);magX=abs(X);
subplot(3,2,2);stem(x);title('输入信号x[n]');subplot(3,2,3);stem(f,magX);title('X频');
Error using ==> mtimes
Inner matrix dimensions must agree.

matlab--?Error using ==> mtimes Inner matrix dimensions must agree.x=[ones(1,10) zeros(1,41)];n=1:50;k=-25:25;W=(pi/12.5)*k;f=(1/25)*k*1000;X=x*(exp(-j*pi/12.5)).^(n'*k);magX=abs(X);subplot(3,2,2);stem(x);title('输入信号x[n]');subplot(3,2,3);stem
数组之间的乘除要用点乘,点除
根据你的fortran程序,是不能直接乘除的,得改成for next循环
a=1
b=1
v0=2.0
for x=0:0.1:a
for y=0:0.1:b
v=v0
for i=1:2:200
v=v+4.0*v0/pi*(sin(i*x*pi/a)*sinh(i*pi*y/a)/(i*sinh(i*pi*b/a)))
next
x;y;v
next
next
请参考