matlab程序Error using ==> times Matrix dimensions must agree.
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/30 16:23:44
matlab程序Error using ==> times Matrix dimensions must agree.
clear all; close all;
I=imread('yls.bmp');
I=im2double(I);
M=2*size(I,1);
N=2*size(I,2);
u=-M/2:(M/2-1);
v=-N/2:(N/2-1);
[U,V]=meshgrid(u, v);
D=sqrt(U.^2+V.^2);
D0=50;
n=6;
H=1./(1+(D./D0).^(2*n));
J=fftshift(fft2(I, size(H, 1), size(H, 2)));
K=J.*H;
L=ifft2(ifftshift(K));
L=L(1:size(I,1), 1:size(I, 2));
figure;
subplot(121);
imshow(I);
subplot(122);
imshow(L);
-----------------------------------
报错
? Error using ==> times
Matrix dimensions must agree.
Error in ==> chap5_26 at 16
K=J.*H;
clear all; close all;
I=imread('yls.bmp');
I=im2double(I);
M=2*size(I,1);
N=2*size(I,2);
u=-M/2:(M/2-1);
v=-N/2:(N/2-1);
[U,V]=meshgrid(u, v);
D=sqrt(U.^2+V.^2);
D0=50;
n=6;
H=1./(1+(D./D0).^(2*n));
J=fftshift(fft2(I, size(H, 1), size(H, 2)));
K=J.*H;
L=ifft2(ifftshift(K));
L=L(1:size(I,1), 1:size(I, 2));
figure;
subplot(121);
imshow(I);
subplot(122);
imshow(L);
-----------------------------------
报错
? Error using ==> times
Matrix dimensions must agree.
Error in ==> chap5_26 at 16
K=J.*H;
请检查J和H两个矩阵的行数列数,看是否一致.
matlab程序Error using ==> times Matrix dimensions must agree.
matlab Error using ==> mrdivide Matrix dimensions must agree
matlab出错Error using ==> times Matrix dimensions must agree.
matlab出现了?Error using ==> times Matrix dimensions must agree
matlab出现了Error using ==> times Matrix dimensions must agree.
Matlab中出现Error using ==> *Inner matrix dimensions must agree
matlab---出现?Error using ==> times Matrix dimensions must agr
matlab--?Error using ==> mtimes Inner matrix dimensions must
matlab程序问题,Error using ==> mrdivide Matrix dimensions must a
matlab程序=========? Error using ==> times Matrix dimensions m
Error using ==> mtimes Inner matrix dimensions must agree 用m
matlab:Error using ==> mtimes Inner matrix dimensions must a