fourier transform info or data

4 vues (au cours des 30 derniers jours)
harley
harley le 15 Août 2013
Simple question for those that are familiar with fourier transform. how do i do a fourier transform on this data below, ts=time, ft=amplitude.
ts = [-10 -5 -5 5 5 10];
ft = [0 0 1 1 0 0 ];
plot(ts,ft);

Réponse acceptée

Image Analyst
Image Analyst le 15 Août 2013
Call fft(), but first get rid of duplicate y values for a given x value. Then you should see the sinc function you are expecting.
  5 commentaires
harley
harley le 15 Août 2013
when i get rid of duplicate y values i get the error,
Vectors must be the same lengths.
how do i get around this.
Image Analyst
Image Analyst le 15 Août 2013
Are you trying to plot the time domain signals? Then you must get rid of the corresponding ts values also.

Connectez-vous pour commenter.

Plus de réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 15 Août 2013
plot(t,f)
%or
stem(t,f)
  1 commentaire
harley
harley le 15 Août 2013
thanks Azzi

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by