Problem 45480. Find the Fourier coefficients of a periodic function
For the a given periodic function, f, calculate the first N Fourier coefficients. The inputs to your function must be one period of the function f, number of harmonics, N, the period T in seconds, and sampling period, Ts, in seconds/sample, and type, which can be 'real' or 'complex'. If type is 'real', return real coefficients in a 2x(N+1) matrix, where first row is the cosine terms. If type is 'complex', return complex coefficients in a 1x(2*N+1) matrix. If you need some help remembering Fourier Series, check this post .
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
306 Solvers
-
Back to basics 21 - Matrix replicating
1788 Solvers
-
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
139 Solvers
-
Find the list of all open files
48 Solvers
-
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
253 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!