MATLAB Answers

Plot the magnitude and argument of the Fourier transformed function in frequency domain.

2 views (last 30 days)
Joy Odigbo
Joy Odigbo on 4 Mar 2021
Answered: Sindhu Karri on 9 Mar 2021
I am not sure how to plot the magnitude and argument of the code I have so far:
>> t=0:20;
>> n=1;
>> sig=1;
>> f=exp((-(t-n).^2)/2).*sin(n.*t);
>> plot(t,f);
>> tn=length(t);
>> fft(f,tn);
>> z=fft(f,tn);
>> abs(z);
>> angle(z);
How should I plot this?

Community Treasure Hunt

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

Start Hunting!