how to make fft2 surf plot with z axis in dB?

7 visualizaciones (últimos 30 días)
Kobi
Kobi el 20 de Nov. de 2014
Editada: Kobi el 20 de Nov. de 2014
i tried to normalize this matrix with the maximum
and: p=10*log10(p);
but i get mess
how can i avoid that?

Respuesta aceptada

Star Strider
Star Strider el 20 de Nov. de 2014
Editada: Star Strider el 20 de Nov. de 2014
Without access to your data, it’s difficult to say. Two possibilities:
First:
p = 10*log10(abs(p));
Second:
p = 10*log10(abs(p)+1E-2);
  1 comentario
Star Strider
Star Strider el 20 de Nov. de 2014
Interesting, to say the least!
This is what I get with your data and this code:
D = matfile('Kobi_pmat.mat');
P = D.P;
LP = 10*log10(abs(P));
figure(1)
mesh(LP)
grid on
axis([600 800 600 800 -30 0])
xlabel('x')
ylabel('y')
zlabel('F(x,y) (dBi)')
title('Fourier Transform of Rectangular Reflector')
producing this plot:

Iniciar sesión para comentar.

Más respuestas (2)

Youssef  Khmou
Youssef Khmou el 20 de Nov. de 2014
This problem does not occur with the following test :
H=exp(-randn(10).^2);
F=abs(fftshift(fft2(H,200,200)));
F=F/max(F(:));
surf(20*log10(F));
try abs() as mentioned earlier .

Kobi
Kobi el 20 de Nov. de 2014
Editada: Star Strider el 20 de Nov. de 2014
here is my data file:
you can load it like this:
data=load('pmat.mat');
P=data.P;

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by