02-05-2013 05:44 AM - edited 02-05-2013 05:51 AM
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
Solved! Go to Solution.
02-05-2013 05:53 AM
take a look a the help topic about the non-linear fitting VI :
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
02-05-2013 07:26 AM
Hi, thanks for ur answer
I did it with nonlinear curve fitting function, but there should be some mistakes, still doesnt working?
02-05-2013 08:37 AM
Bye the way, i dont know how to decide initial parameters, can anybody help me with that?
thanks
02-05-2013 08:42 AM
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
02-06-2013 05:00 AM
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?
02-06-2013 08:20 AM
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
02-06-2013 10:55 AM
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
02-06-2013 12:58 PM
Your function is a simple quadratic polynomial, so you should use the general polynomial fit function instead. Don't overcomplicate things 😄
02-06-2013 01:03 PM
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