Plot result of fourier
1 view (last 30 days)
Show older comments
Can someone help im trying to plot the fourier spectrum of signal u:
syms t w
u=10*sin(t);
%fourier transform
four=fourier(u)
fplot(four)
Answers (2)
Star Strider
on 9 May 2018
1 Comment
Star Strider
on 10 May 2018
@Newbie —
It gives the result as:
four =
-pi*(dirac(w - 1) - dirac(w + 1))*10i
and plots it as a straight line.
You can also try:
syms t w
u=10*sin(t);
%fourier transform
four = int(u*exp(1j*w*t), t, -1, 1)
four = simplify(four,'Steps',20)
% four = fourier(u)
fplot(real(four), [-15 15])
hold on
fplot(imag(four), [-15 15])
hold off
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!