Polynomial Curve Fitting Function
Mostra commenti meno recenti
Hi, I have some problem regarding the polynomial curve fitting. I compute coefficient from Data A using fifth degree polynomial and the sample coefficient obtained from Data A was used back to Data B (to reconstruct similar to Data A). My question is did the polynomial considered my Data B also to fit the curve ?
Risposte (1)
KSSV
il 15 Nov 2016
0 voti
No it will not consider data B. It gives polynomial coefficients based on Data A. If your data B x ranges are same as data A x ranges, then data B can be fitted with this polynomial.
9 Commenti
farah
il 16 Nov 2016
KSSV
il 16 Nov 2016
As the x range's of both the data's are same. Using the coefficients, it will find the respective y values. Fit will be good.
farah
il 19 Nov 2016
KSSV
il 19 Nov 2016
Attach your data...this is not a tough job..
farah
il 23 Nov 2016
farah
il 23 Nov 2016
Walter Roberson
il 23 Nov 2016
sine wave requires infinite degree polynomial to fit.
A fifth degree polynomial has at most 5 real-valued zero crossings. 4 cycles of a sine wave has crossings at 0, Pi, 2*Pi, 3*Pi, 4*Pi, 5*Pi, 6*Pi, 7*Pi, and ends one sample before 8*Pi, which is 8 crossings. Therefore a fifth degree polynomial would have to show very noticeable differences than 4 full cycles of sine.
farah
il 24 Nov 2016
Walter Roberson
il 24 Nov 2016
x = linspace(0, 4*2*pi, 501);
x(end) = []; %4 cycles would not touch 0 a fifth time
S4 = sin(x);
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!