topic Re: Nonlinear Curve Fit in LabVIEW
https://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368884#M991859
<P>One generally <U>starts</U> with a hypothesis, "I expect Reality to behave this way", which can also be expressed as a "model" such as "Temperature as a function of height should be a sigmoid". You do an experiment (or take some measurements), then test your hypothesis (fit your model). If the model fits, it does not <U>prove</U> your hypothesis, but can allow you to <U>assume</U> your hypothesis is true and then say something like "and the Critical Temperature is X degrees". If the model does <U>not</U> fit, it suggests that the hypothesis is false. The solution is to come up with an alternative hypothesis, but the hypothesis should come first! You can always exactly fit N data points with a polynomial of degree N+1, but that has no "explanatory value" (and is highly unlikely to generalize to a second data set).</P><P> </P><P>Bottom line -- come up with your own alternative fitting function, preferably one that "makes sense" in the context of your study.</P><P> </P><P>Bob Schor </P>Tue, 15 Nov 2016 14:17:45 GMTBob_Schor2016-11-15T14:17:45ZNonlinear Curve Fit
https://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368851#M991848
<P>Hello.</P><P>At the moment i am fitting a temperature profile that is equal to the sigmoid function (first picture).</P><P>But in some cases the temperature profile is not equal to the sigmoid function (second picture) and so i have to find another way to fit this profile.</P><P>White is the original temperature profile and the red/green is the fitted function.</P><P>You will see the fitting code at the end.</P><P>Can anybody help me?</P><P> </P><P>Thanks, Martin</P>Tue, 15 Nov 2016 13:10:30 GMThttps://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368851#M991848MartinBauer2016-11-15T13:10:30ZRe: Nonlinear Curve Fit
https://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368852#M991849
<P>i am using the fourth formula where b and c are the fitted parameters.</P>Tue, 15 Nov 2016 13:14:37 GMThttps://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368852#M991849MartinBauer2016-11-15T13:14:37ZRe: Nonlinear Curve Fit
https://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368884#M991859
<P>One generally <U>starts</U> with a hypothesis, "I expect Reality to behave this way", which can also be expressed as a "model" such as "Temperature as a function of height should be a sigmoid". You do an experiment (or take some measurements), then test your hypothesis (fit your model). If the model fits, it does not <U>prove</U> your hypothesis, but can allow you to <U>assume</U> your hypothesis is true and then say something like "and the Critical Temperature is X degrees". If the model does <U>not</U> fit, it suggests that the hypothesis is false. The solution is to come up with an alternative hypothesis, but the hypothesis should come first! You can always exactly fit N data points with a polynomial of degree N+1, but that has no "explanatory value" (and is highly unlikely to generalize to a second data set).</P><P> </P><P>Bottom line -- come up with your own alternative fitting function, preferably one that "makes sense" in the context of your study.</P><P> </P><P>Bob Schor </P>Tue, 15 Nov 2016 14:17:45 GMThttps://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368884#M991859Bob_Schor2016-11-15T14:17:45ZRe: Nonlinear Curve Fit
https://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368970#M991878
<P>Are you sure that you don't accidentally have they axes (x vs. y) swapped in some of the data sets? Maybe the hardware is hooked up incorrectly.</P>Tue, 15 Nov 2016 18:04:24 GMThttps://forums.ni.com/t5/LabVIEW/Nonlinear-Curve-Fit/m-p/3368970#M991878altenbach2016-11-15T18:04:24Z