LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

R-squared value of an Exponential fit

My problem is that I want to fit an exponential curve to some data, no problem doing that using the 'exponential fit.vi'. Thing is, I would also like to generate the R-squared value for the fit, as you can do in MS Excel. But the 'exponential fit.vi' only outputs the Mean Squared Error. If anyone has any ideas or can even point me in the right direction of this, I'd be very grateful. Thanks, Rob
0 Kudos
Message 1 of 4
(7,419 Views)

Upgrading to LabVIEW 8 or 8.2 is one right direction. There is a huge amount of new curve fitting functions available, including a VI called Goodness of Fit that evaluates the output of a curve fitting function versus the original data and outputs the R-squared value.

Here's a link on What's New in 8.0. 8.2 brings with it a number of other benefits, but the math and signal processing functions were mostly added in 8.0. Hope this helps!

Jarrod S.
National Instruments
0 Kudos
Message 2 of 4
(7,400 Views)
Or write your own... there's plenty of way's to go about it.
Here's one using PMCC method in LV7
Message 3 of 4
(7,390 Views)
thanks for your help guys, very useful, In fact, in case anybody else is interested in why the output from this vi is different to the R^2 value given by Excel,the difference is that Excel linearises the Exponential function by multiplying both sides by the natural log. Then, plotting Ln(y) against x, you get a straight line graph, and the R^2 value quoted by Excel for an Exponential function, is in fact the R^2 value of the transformed straight line. Its very easy to verify this
0 Kudos
Message 4 of 4
(7,373 Views)