FFT of a summation

1 次查看(过去 30 天)
Me29
Me29 2017-4-19
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
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