Filter löschen
Filter löschen

Polynomial Interpolation in Matlab

148 Ansichten (letzte 30 Tage)
Sergey Dukman
Sergey Dukman am 10 Mai 2015
Beantwortet: Joan Triadó am 4 Feb. 2022
Hei!
Can somebody help me with polynomial Interpolation in Matlab? I have a data set for x and y as vectors and N=15 as the order of polynomial.T o compute coefficient c I do as follows:
x=data(1,:);
>> y=data(2,:);
c=polyfit(x,n,14);
My question is what coefficient c is?
regards, Sergey
  1 Kommentar
Charles Garner
Charles Garner am 26 Sep. 2020
my understanding is that C is arbitrary. Pick you own value.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

the cyclist
the cyclist am 10 Mai 2015
The output of polyfit is described in the very first sentence of the documentation here. Have you read that, and not understood it?
Also, in your code, what is n? Given how you have defined x and y, I would have expected your polynomial fit to be done with
polyfit(x,y,14)
Finally, I'm curious what your application of this is. I can't think of one where the fitting of a 15th-order polynomial is a good idea.
  4 Kommentare
Star Strider
Star Strider am 10 Mai 2015
There must be a mathematical model of ethanol equilibrium available that estimates far fewer than 14 parameters from your 15 sets of data. Use that model, and fit it with one of the nonlinear parameter estimation functions (for example, nlinfit). It will give you a relatively accurate description of the process, and the estimated parameters will have physical meaning. As John has mentioned, throwing a 14-degree polynomial at it will likely confuse you more than enlighten you.
Charles Garner
Charles Garner am 26 Sep. 2020
I am a co-author of a US Patent that uses curve fiitting. I think it is roughly 5th order. Patent #5706215. Related also to US Patent #5530925 In my telecom world, generally anything higher than 5 order isn't neccesary. You can play with it but it's not helpful.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Joan Triadó
Joan Triadó am 4 Feb. 2022
polynomial coefficients in descending powers

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by