Fourier coeffs of a function in Matlab

Click For Summary
SUMMARY

The discussion focuses on calculating Fourier coefficients of a harmonic function represented as a finite series of cosine terms using MATLAB. The user seeks clarification on generating variable functions in MATLAB and obtaining specific Fourier coefficients rather than a vector. The recommended approach involves evaluating the function at a dense set of points and applying the Fast Fourier Transform (FFT) to extract the coefficients directly from the real part of the output.

PREREQUISITES
  • Understanding of harmonic functions and their representation as Fourier series
  • Familiarity with MATLAB programming and its syntax
  • Knowledge of Fast Fourier Transform (FFT) and its application in signal processing
  • Basic concepts of numerical evaluation of functions at discrete points
NEXT STEPS
  • Explore MATLAB's symbolic toolbox for generating variable functions
  • Learn how to implement FFT in MATLAB for Fourier analysis
  • Research methods for evaluating functions at a dense set of points in MATLAB
  • Study the mathematical theory behind Fourier coefficients and their computation
USEFUL FOR

Mathematics students, engineers, and researchers working with harmonic functions and Fourier analysis in MATLAB.

Alexandr
Messages
3
Reaction score
0
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?
 
Physics news on Phys.org
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
3
Views
2K