"Attempt to execute SCRIPT fft2 as a function" Don't know how to solve this mistake. fft2 is a function of matlab. Thanks!
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Felipe neut
il 21 Nov 2016
Risposto: Star Strider
il 21 Nov 2016
clc;clear;
datos = imread('/users/Desktop/arroz.png');
U = im2double(datos);
[N,M] = size(datos);
P = 2*N;
Q = 2*M;
K1 = [0.0509 0.1238 0.0509;0.1238 0.3012 0.1238;0.0509 0.1238 0.0509];
K2 = [0.4444 0.1111 0.4444;0.1111 -2.2222 0.1111; 0.4444 0.1111 0.4444];
h1 = conv2(U,K1,'same');
h2 = conv2(U,K2,'same');
figure;
subplot(1,2,1);imshow(h1,[]);title('Convolución con kernel K1');
subplot(1,2,2);imshow(h2,[]);title('Convolución con kernel K2');
ZP1 = zeros(P,Q);
ZP2 = zeros(P,Q);
ZP1(1:N,1:M) = h1;
ZP2(1:N,1:M) = h2;
DFT1 = fft2(ZP1);
DFT2 = fft2(ZP2);
figure;
subplot(1,2,1);imshow(log(abs(DFT1))+1,[]);title('DFT de imagen convolucionada con K1');
subplot(1,2,2);imshow(log(abs(DFT2))+1,[]);title('DFT de imagen convolucionada con K2');
0 Commenti
Risposta accettata
Star Strider
il 21 Nov 2016
You have a file in your user directory called ‘fft2’. Find it with:
which fft2 -all
then find the file in your user directory, and re-name it to something that does not conflict with any built-in MATLAB function name.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!