【发布时间】:2012-09-05 22:04:50
【问题描述】:
我正在尝试在 matlab 中找到图像的傅立叶变换。我在没有库函数的情况下这样做。代码是:
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.')).');
当我编译这个程序时出现以下错误:
??? Error using ==> mtimes
Complex integer arithmetic is not supported.
Error in ==> qn4 at 12
af1=(w*a);
当我使用 a=rand(1,128) 而不是 a=imread('lena128','bmp') 时,我没有收到该错误。 我在网上搜索,发现类似的问题。但没有解决办法。谁能帮我指出错误?
【问题讨论】:
标签: matlab image-processing fft complex-numbers