i dont know why the second figure is empty
1 view (last 30 days)
Show older comments
fs=20;
Ts=1/fs;
N=1024
Tmax=(N-1)*Ts;
t=-10:Ts:10;
ut=exp(-(t/10).^2);
plot(t,ut.^2)
f=-5:fs:5;
z=fftshift(fft(ut));
plot(f,abs(z))
0 Comments
Answers (1)
Azzi Abdelmalek
on 30 Nov 2013
Edited: Azzi Abdelmalek
on 30 Nov 2013
Figure 1 was erased by figure 2
fs=20;
Ts=1/fs;
N=1024
Tmax=(N-1)*Ts;
t=-10:Ts:10;
ut=exp(-(t/10).^2);
%-----figure 1--------------
plot(t,ut.^2)
% -----figure 2------------
figure
z=fftshift(fft(ut));
plot(abs(z))
Check this
f=-5:fs:5
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!