LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matlab function polyfit?

I am looking for a polyfit function that does the same thing as in matlab. the syntax in matlab is
[p,S] = polyfit(x,y,n)
i found some different types of curve fitting under
mathematics, but i don't know which one to use.

thank you
0 Kudos
Message 1 of 3
(5,223 Views)
There is no exact duplicate of the matlab function, but you are probably looking for the "General Polynominal Fit.vi" which is quite similar.

Inputs are the same:
x-array, y-array, n (polynominal order). (plus some more).

Outputs are similar:
(1) polynominal fit coefficients (in reverse order compared to matlab, which starts with the higher terms).
(2) You only get the mse, instead of the structure S.
(3) you also get the best fit value for each x-input.
Message 2 of 3
(5,223 Views)

Please let me know polynomial co-effiecent  output from "General Polynominal Fit.vi" will be similiar to ployfit functions on Matlab environment .

As i am getting different  polynomial co-effiecent  output from both of functions at same input ploynomials.

 

0 Kudos
Message 3 of 3
(4,287 Views)