I am trying to find the Fourier transform of an image in matlab. I do this without a hep library function. The code:
clc;
clear;
N=128;
a=imread('lena128','bmp');
zeros(N,N);
for m=1:N
for n=1:N
w(m,n)=(exp(-1i*2*pi/N))^((m-1)*(n-1));
end
end
af1=(w*a);
af=((w*(af1.')).');
When compiling this program, the following error occurs:
??? Error using ==> mtimes
Complex integer arithmetic is not supported.
Error in ==> qn4 at 12
af1=(w*a);
When I use a = rand (1,128), instead of a = imread ('lena128', 'bmp'), I do not get this error. I searched the Internet and found similar problems. But there is no solution. Can anyone point out an error for me?
source
share