Fourier coeffs of a function in Matlab

  • MATLAB
  • Thread starter Alexandr
  • Start date
  • #1
3
0

Main Question or Discussion Point

Please, people, need help!

I have a harmonic function which is a product of cosines (something with many cos(k*phi)) and it can be represented as a finite series with only cos terms... We know it...

Now. Every step we multiply this function by one more cos and want to find the Fourier coefs.

So, I don't understand two things...
1. There is no any method in Matlab to generate functions of variables as I understand... So, how can I provide this updating? I need that function of phi...
2. Is there any command for finding nth Fourier coefficient of function, not a vector?

Any useful tips?
 

Answers and Replies

  • #2
Dr Transport
Science Advisor
Gold Member
2,306
428
If you can write the function, set a vector of points x where the delta is very small, evaluate the function then take the FFT, the coefficients should pop right out as the real part.
 

Related Threads for: Fourier coeffs of a function in Matlab

Replies
1
Views
17K
Replies
4
Views
26K
  • Last Post
Replies
3
Views
78K
  • Last Post
Replies
0
Views
6K
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
3
Views
1K
Replies
1
Views
3K
Replies
1
Views
6K
Top