11-30-2011 05:02 PM
Hi all!
I am trying to use NationalInstruments.Analysis.Math to calculate the slope and intercept of a scatter graph using VB. I'm using the CurveFit property but cannot find any resources regarding the applicable syntax. Any any help would be greatly appreciated.
Thanks in advance!
12-01-2011 10:49 AM
Hi,
In Measurement Studio 6 there was a straitforward solution to your problem.
Dim slope, intercept, mse, z As Object Form1.Stat1.LinFit(xvalues, yvalues, z, slope, intercept, mse)
In the .NET versions it doesn't look so simple.
Try this instead
http://www.vb-helper.com/howto_net_linear_least_squares.html
Hope this helps
Curt