Question about fitting periodic data

  • I
  • Thread starter ftft
  • Start date
  • #1
21
0

Main Question or Discussion Point

My experience with data fitting is poor so I am in real need for help.
The potential in the following is periodic over [0,Pi]
-TvEuURwmnboNeDc1hN8aBhBkWcK4kYbjZhf4lPAZeE6fUeQvsEFcp56MUrHXa2Y9tATurVnxQLgm3EVsdR=w360-h211-no.gif

I need to find a fitting function that I can use to perform further mathematics. Fourier series does not work, but a 40-degree polynomial give the following fit
9iL8mytaLHj6GJp882dVJnCy-Nqr62qTLGS0dNx4JEdCKuJWhwD_DRFy3JoUr6X6kWcId3eSMQshzo9jtIM=w360-h215-no.gif

However, the polynomial does not preserve its periodicity over the cycle. Could someone please advice what I should do to get a good fitting function for my data?
 

Answers and Replies

  • #2
22,097
3,279
Fitting with a polynomial with degree larger than 3 is a really bad idea.

Why don't you try to fit this function with a combination of straight lines?? And why do Fourier series not work?
 
  • #3
34,050
9,906
A set of straight lines for different ranges should fit best. A Fourier series should give reasonable approximations, but only if you include many terms.
 
  • #4
Svein
Science Advisor
Insights Author
2,025
649
Looking at the vertical scale: Is your data set really constricted to the value -9.74771?
 

Related Threads on Question about fitting periodic data

Replies
6
Views
9K
  • Last Post
Replies
2
Views
644
  • Last Post
Replies
4
Views
594
  • Last Post
Replies
9
Views
3K
  • Last Post
Replies
14
Views
3K
  • Last Post
Replies
1
Views
986
  • Last Post
Replies
4
Views
19K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
5
Views
813
Replies
19
Views
618
Top