LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

curve fitting gives input, at the output

Solved!
Go to solution

Hi everybody, i am having a problem at curve fitting function,

i take at output, what i give as input, where do i make mistake?

at example i give 4 values, if i enter 6 values it works, but i need to do it with 4 values.

any ideas?

thanks

0 Kudos
Message 1 of 19
(3,091 Views)

take a look a the help topic about the non-linear fitting VI :

 

Clipboard01.png

 

Apparently what you did was creating a constant on the f(x,a) termanial, this then causes an error because the VI is expecting you to create a VI from a template. You either have to create that VI or use a different fitting method.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 19
(3,085 Views)

Hi, thanks for ur answer

I did it with nonlinear curve fitting function, but there should be some mistakes, still doesnt working?

 

0 Kudos
Message 3 of 19
(3,075 Views)

Bye the way, i dont know how to decide initial parameters, can anybody help me with that?

thanks

0 Kudos
Message 4 of 19
(3,063 Views)

What's wrong? it works fine for me... what error are you getting?

Of course you need to input an array containing 3 values in "initial parameters" for the initial values of a1, a2 and a3.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 5 of 19
(3,062 Views)

thanks, i didnt put 3 values for it, i will try it like that. 

and how can i determine, which values should i write as initial values?

0 Kudos
Message 6 of 19
(3,039 Views)

i entered 3 value as u said, now i dont get any error, but output is same as input. function doesnt make any curve.

if u got curve, can u share ur initial parameters with me

0 Kudos
Message 7 of 19
(3,031 Views)

Please include your data.  What values are you using for Array and Initial Parameters?  With only 4 data points you may have a system which either matches perfectly to a the curve or which cannot be matched by a second order curve.

 

For example an input of 0,3,3,0 with initial = 2,2,2 produces -6.8E-17, 3, 3, 1.7E-15 which plots identically to the input.

 

Lynn

0 Kudos
Message 8 of 19
(3,018 Views)

Your function is a simple quadratic polynomial, so you should use the general polynomial fit function instead. Don't overcomplicate things 😄

0 Kudos
Message 9 of 19
(3,008 Views)

sorry, i thought datas will be visible if i upload program.

i used as input

0.005

-0.05

-0.05

-0.005

 

as initial values, i have no idea what should i write, which value:/.

i need to do it with 4 data, 

thank you

0 Kudos
Message 10 of 19
(3,006 Views)