FFT of a summation

조회 수: 2 (최근 30일)
Me29
Me29 2017년 4월 19일
편집: Darshan Ramakant Bhat 2017년 4월 21일
Hello, Attached is a summation function that I am using a FOR loop to implement. I am trying to get the FFT of that function. Attached is an image of what the FFT should look like. Can someone help, please? Thanks!
<<
>>

답변 (1개)

Darshan Ramakant Bhat
Darshan Ramakant Bhat 2017년 4월 21일
편집: Darshan Ramakant Bhat 2017년 4월 21일
To calculate fft the signal should be discrete. You should first sample your signal. Use t=nTs, where Ts is the sampling time. Calculate X(n) for n=1:N, where N is required number of samples. Then you can give this array to fft function.
I have attached a sample script of the same.You can tune the parameters to get the required spectrum. Please have a look at the following documentation for more details.

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by