fourier transform info or data

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);

 채택된 답변

Image Analyst
Image Analyst 2013년 8월 15일

0 개 추천

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

harley
harley 2013년 8월 15일
thanks for replying, what coding would you recommend to stream line what i am trying to do?
harley
harley 2013년 8월 15일
thanks
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 2013년 8월 15일
Are you trying to plot the time domain signals? Then you must get rid of the corresponding ts values also.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 15일

0 개 추천

plot(t,f)
%or
stem(t,f)

질문:

2013년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by