Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Analysis.Math to find slope and intercept

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!

0 Kudos
Message 1 of 2
(4,175 Views)

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

0 Kudos
Message 2 of 2
(4,160 Views)