Error using .* Matrix dimensions must agree.

조회 수: 1 (최근 30일)
vetri veeran
vetri veeran 2014년 11월 7일
편집: Mike Hosea 2014년 11월 8일
func1:
function [ ] = fftshow(f)
f1=log(1+abs(f)); fm=max(f1(:)); figure, imshow(im2uint8(f1/fm));
end
func2:
function [ ] = ifftshow( f )
f1=abs(f); fm=max(f1(:)); figure,imshow(f1/fm);
end
main program:
clc; clear all; close all;
a=imread('cameraman.jpg'); figure,imshow(a);
af=fftshift(fft2(a)); figure,imshow(af);
fftshow(af)
[x,y]=meshgrid(-128:127,-128:127); z=sqrt(x.^2+y.^2); c=z<15;
af1=af.*c; fftshow(af1)
i got an error as
Error using .* Matrix dimensions must agree.
Error in fftlpf (line 18) af1=af.*c;
can anyone help me in this regard

채택된 답변

Mike Hosea
Mike Hosea 2014년 11월 7일
편집: Mike Hosea 2014년 11월 8일
The size of af is the image size. The size of c is 256-by-256. I'm guessing your image is not 256-by-256. If not, what were you expecting af.*c to do? Then we'll see if we can figure out how to do that.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by