Problem writing built in code for Fast Fourier Transform
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello! I try to write my own built in code for Fast Fourier Transform to processed image with strong diagonal line with fftshift function
function out = myfft2(im,dim1,dim2,logflag)
if nargin==1
logflag = 1;
[dim1,dim2] = size(im);
elseif nargin==2
logflag = dim1;
[dim1,dim2] = size(im);
elseif nargin==3
logflag = 1;
end
if logflag
out = fftshift(log(abs(fft2(double(im),dim1,dim2))));
else
out = fftshift(abs(fft2(double(im),dim1,dim2)));
end
imshow(out,[])
After I have computed, it returned with errors:
>> myfft
Not enough input arguments.
Error in myfft (line 13)
if logflag
I still cannot figure out which part I did wrong :((
0 comentarios
Respuestas (1)
Walter Roberson
el 1 de Jun. de 2016
Your myfft2() code is written expecting at least one argument to be passed in the call, but you are not passing any argument. What is your expectation on how the value for "im" is going to be found?
0 comentarios
Ver también
Categorías
Más información sobre Discrete Fourier and Cosine Transforms en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!