vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
Go Back  Xtreme Visual Basic Talk > > > vb.Net Linest for second order polynomial


Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2015, 10:15 AM
gohan47 gohan47 is offline
Newcomer
 
Join Date: Jun 2015
Posts: 1
Default vb.Net Linest for second order polynomial


Hello, thank you in advance for the help. I am trying to run the excel linest application in vb.net and can get it to work for first order, but cannot figure out how to adjust the code to accommodate for a second order fit, for instance in vba the function is linest(y,x^{1,2},T,T). How do I work in the "^{1,2}"?

Here is the code working now for a first order fit:

' index over y measured points
For i = 0 To N
Dim iMin = (i + 8) - iRange
If iMin < 8 Then iMin = 8
Dim iMax = (i + 8) + iRange
If iMax > N Then iMax = N


Dim xr(0 To iMax - iMin + 1) As Single

'range of points near x,y scaled to tolerance levels
Dim yr(0 To iMax - iMin + 1) As Single
For j = 0 To iMax - iMin + 1
xr(j) = j
yr(j) = Rdt.Rows(j + 8).Item(0)

Next j

''Measured point scaled to tolerance levels
Dim x0 = i / DTA
Dim y0 = (Mdt.Rows(i + 8).Item(0))

Dim aa(5, 3)
aa = xls.LinEst({yr, xr, True, True)
Dim a2 = aa(1, 1)
Dim a1 = aa(1, 2)
Dim a0 = aa(1, 3)

Thank you again for looking and helping!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
 
vb.Net Linest for second order polynomial
vb.Net Linest for second order polynomial
 
-->