Borrar filtros
Borrar filtros

Is there anyway to plot a fft2 function

3 visualizaciones (últimos 30 días)
matlabuser1
matlabuser1 el 13 de Mayo de 2021
Comentada: Star Strider el 13 de Mayo de 2021
fc = 24e9;
c = 3e8;
lambda = c/fc;
p = 25; %number of pulses
n = 25; %samples collecetd for each pulse
bw = 300e6; %300 M hz bw
T = 300e-6;
k= bw/T;
v1 = 45;
v2 = 0
fd1 = (2*v1)/lambda;
fd2 = (2*v2)/lambda;
R1 = 150; %Range 1 20 m
R2 = 50; %Range 2 10 m
tau1 = (2*R1)/c;
tau2 = (2*R2)/c;
To1= T + tau1; %To for target 1
To2 = T + tau2; %to for target 2
fs = 300e6;
%fs1 = 1/To1; %sampling frequency for target 1
%fs2 = 1/To2;
for ii=1:p
for ii=1:n
a = exp(1i*2*pi*((((2*k*R1)/c)+fd1)*(n/fs)+(fd1*p*To1)+((2*fc*R1)/c))) ;
b = exp(1i*2*pi*((((2*k*R2)/c)+fd2)*(n/fs)+(fd2*p*To2)+((2*fc*R2)/c))) ;
w = a + b ;
end
end
x = fft2(w,n,p)
plot(w,x)
%z = getMatchedFilter(x);
%matchedfilter = phased.MatchedFilter(...
% 'Coefficients',z,...
%'SpectrumWindow','Hamming');
%matchFiltered = step(matchedfilter,beamformed);
%load RangeDopplerExampleData;
%hrdresp = phased.RangeDopplerResponse(...
% 'RangeMethod','FFT',...
% 'PropagationSpeed',c,...
%'DopplerOutput','Speed','OperatingFrequency',fc);
%plotResponse(hrdresp,...
% x,w,...
% 'Unit','db','NormalizeDoppler',true)
%plotresponse(x,n,p)
%% The above code display a matrix that is 25X25 to represent a data cube. Is there anyway to take that data that is being displayed
%%fft2 and display teh speed an location of the twoo objects in teh code.
%%The objecyt are denoted (v1,R1) and (v2,R2)
  1 comentario
Star Strider
Star Strider el 13 de Mayo de 2021
Use any of the surface plotting functions.
However, since ‘w’ is a scalar, the Fourier transform will be a constant.
Both loop counters are the same ‘ii’ variable, nothing in either ‘a’ or ‘b’ ever changes, and ‘w’ is not subscripted to create a matrix. I leave those corrections to you.
fc = 24e9;
c = 3e8;
lambda = c/fc;
p = 25; %number of pulses
n = 25; %samples collecetd for each pulse
bw = 300e6; %300 M hz bw
T = 300e-6;
k= bw/T;
v1 = 45;
v2 = 0;
fd1 = (2*v1)/lambda;
fd2 = (2*v2)/lambda;
R1 = 150; %Range 1 20 m
R2 = 50; %Range 2 10 m
tau1 = (2*R1)/c;
tau2 = (2*R2)/c;
To1= T + tau1; %To for target 1
To2 = T + tau2; %to for target 2
fs = 300e6;
%fs1 = 1/To1; %sampling frequency for target 1
%fs2 = 1/To2;
for ii=1:p
for ii=1:n
a = exp(1i*2*pi*((((2*k*R1)/c)+fd1)*(n/fs)+(fd1*p*To1)+((2*fc*R1)/c))) ;
b = exp(1i*2*pi*((((2*k*R2)/c)+fd2)*(n/fs)+(fd2*p*To2)+((2*fc*R2)/c))) ;
w = a + b ;
end
end
x = fft2(w,n,p);
figure
surf(real(x))
grid on
figure
surf(imag(x))
grid on
figure
surf(abs(x))
grid on
.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by