Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General polynomial in VB6 without Excel?

Status
Not open for further replies.

acjeff

Programmer
Aug 10, 2004
148
0
0
US
Hi,

Is it possible? I have 2 sets of data for X and Y. I want a VB6 program to general a trendline with 4th order polynomial equation automatically and then take all the coefficients for other purposes. However, the machine do not have Excel installed. Can I still do that?

Jeff
 
Can I do that?"

Yes

How?

No clue. You would have to essentially re-write the same algorithm that Excel uses in your own code.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
acjeff,

I got my answer back in the 1980's from a book called BASIC PROGRAMS FOR SCIENTISTS AND ENGINEERS (specifically Figure 7.5) by Alan R. Miler - Pub Sibex 1981 - ISBN 0-89588-073-3 - the code in in BASICA but conversion to vb6 is pretty straight-forward.

I still have that answer running in vb6 but it is not easy and the code is too lengthy to post here. If you are serious and you email me via the address given at I will send you some stuff. I hope this does not break any forum rules.

Otherwise checkout 'Gauss-Jordan Parabolic Least Squares fit' in books or Google (although I have'nt tried the latter yet)

regards Hugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top