Plot result of fourier

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)

Réponses (2)

Newbie
Newbie le 10 Mai 2018

1 vote

thank you but why cant i have the analytical solution of the function plotted? Its literally right there in the variable four....
Star Strider
Star Strider le 9 Mai 2018

0 votes

See the documentation for the fft (link) function.

1 commentaire

Star Strider
Star Strider le 10 Mai 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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Centre d'aide et File Exchange

Question posée :

le 9 Mai 2018

Commenté :

le 25 Sep 2020

Community Treasure Hunt

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

Start Hunting!

Translated by