0
$\begingroup$

I have a physical quantity (experimentally measured) lets say T whose variation I have measured with angle (theta in degrees). I want to find out the Fourier components of this quantity with respect to theta i.e. basically find out the components of sin(theta), sin(2 theta)... and so on in its expansion.

What I am doing currently is I am trying to fit a non-linear model of the form A+Bsin(theta)+Csin(2theta) and so on depending on the number of terms I need which works quite well but is there a direct way to get the Fourier series coefficients.

My data is here

data = {{1.1172, 4.62*10^-8}, {12.619, 4.47*10^-8}, {24.638, 
  4.44*10^-8}, {35.7164, 4.34*10^-8}, {47.7885, 4.14*10^-8}, {59.3201,
   4.14*10^-8}, {71.6327, 3.83*10^-8}, {83.2878, 
  3.44*10^-8}, {94.4534, 3.39*10^-8}, {106.053, 3.06*10^-8}, {118.451,
   3.16*10^-8}, {130.402, 3.32*10^-8}, {142.897, 
  3.59*10^-8}, {155.719, 4.02*10^-8}, {167.718, 4.35*10^-8}, {179.867,
   4.85*10^-8}, {191.746, 4.8*10^-8}, {203.29, 4.99*10^-8}, {215.511, 
  5.43*10^-8}, {227.228, 5.56*10^-8}, {238.653, 6.02*10^-8}, {251.438,
   5.83*10^-8}, {263.693, 5.85*10^-8}, {275.223, 
  5.27*10^-8}, {287.595, 5.01*10^-8}, {299.263, 5.01*10^-8}, {310.811,
   4.85*10^-8}, {322.76, 4.94*10^-8}, {334.224, 4.99*10^-8}, {346.385,
   4.84*10^-8}, {358.353, 4.84*10^-8}, {365.005, 
  4.39*10^-8}, {365.005, 4.68*10^-8}}

Where x is the angle (in degrees) and y is T.

$\endgroup$
  • 2
    $\begingroup$ I started looking at your data asking if we could use the numerical Fourier to get your coefficients. This is the quick way to get the parameters you need. However, your data is not quite evenly sampled and the last two points are repeated. Thus I would have to interpolate your data to get evenly spaced points. I have run out of time but this is a way forward. See here for some notes of mine on using Fourier. Note also, that you need to have cos and sin terms in your Fourier series. $\endgroup$ – Hugh Oct 21 at 19:31
  • $\begingroup$ You can do a linear least-squares fit, there is no need to do nonlinear fitting here. This is a very direct way (matrix inversion). $\endgroup$ – Roman Oct 21 at 20:21
  • $\begingroup$ As @Hugh says, you probably want to use Fourier. Perhaps your last angle measurement is incorrect? $\endgroup$ – mikado Oct 21 at 21:03
  • $\begingroup$ In the last measurement, you can take either of the two T values. $\endgroup$ – Indeterminate Oct 22 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.