MATLAB error: complex integer arithmetic is not supported
MATLAB error: complex integer arithmetic is not supported
使用 .*
时出错
不支持复数运算。
Error in DFT (line 35)
J(u,v) = J(u,v) + I(x,y) .*exp(-1i*2*pi.*((u*(x-1)/M)+(v*(y-1)/N)));
这个错误是由于数据类型不兼容造成的。您可能正在使用 uint8 类型数据的图像,但其他算法需要 double.
我建议您先将信号转换为double。例如,在循环之前这样写:
I = double(I); %// Now your signal is double type
%// ...
%// for loops and calculations
%// ...
希望这能解决您的问题..
使用 .*
时出错
不支持复数运算。
Error in DFT (line 35)
J(u,v) = J(u,v) + I(x,y) .*exp(-1i*2*pi.*((u*(x-1)/M)+(v*(y-1)/N)));
这个错误是由于数据类型不兼容造成的。您可能正在使用 uint8 类型数据的图像,但其他算法需要 double.
我建议您先将信号转换为double。例如,在循环之前这样写:
I = double(I); %// Now your signal is double type
%// ...
%// for loops and calculations
%// ...
希望这能解决您的问题..