Peter,
I did make such an mbx five or six years ago. The particular mbx analysed radio field strength measurements. The inputs were selections from a map window and the output was an X-Y graph of the input values with the line-of-best-fit.
I don't see a way of effectively explaining an algorithm containing mathematical symbols in an e-mail message. (I started to, but it looked confusing to me, even though I already new what it meant). If you wish I can send you instructions about how do 'lines-of-best-fit' by the Least Squares method in Mapinfo, and you do whatever you want with the information. It should be noted that this particular algorithm is only suitable for linear data. It doesn't curve fit, it just draws a straight line through a lot of x-y values.
I would be happy to create such an mbx for you, but you will need to be a little patient as the only Mapbasic compiler I have access to is at work, and even then I only have limited access to it. You will need to specify (at least in general terms) what type of input and output you require. For instance, would the input be fields in a table, a text file, a selection from a map? Would the output be just the slope and y-intercept of the line, a Mapinfo table, a text file, a graph, a line through points on a map?
If you do not have the time wait for me to create the mbx, or the resources to do it yourself, you could do this in a spreadheet. You may be limited in this by the number of points you wish to analyse. To acomplish this, export the data to the spreadsheet and analyse that data with the regression fucntions in the spreadsheet. Maybe with some coding you could use OLE or something like that.
With Kind Regards,
David Embrey
----- Original Message ----- From: "Peter Horton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 17, 2004 10:11 AM
Subject: MI-L Line of best fit
Is anyone aware of an in-built command or MBX that will allow you to find the line of best (ie regression line with least squares error) for a group of points in Mapinfo? I know there is a smoothing option, but this is quite different to a regression line.
-------------------------------------------------------------------------- Patterson Britton & Partners Pty Ltd PO Box 515, North Sydney, Australia, 2059 Tel: (02) 9957 1619, Fax: (02) 9957 1291 --------------------------------------------------------------------------
This e-mail does not give rise to any binding obligation upon Patterson Britton & Partners Pty Ltd, unless the contents are confirmed officially in writing, non-electronically. Reliance on the contents of this e-mail is entirely at the risk of the recipient until such confirmation is received. This e-mail may be confidential, legally privileged or otherwise protected by law and unauthorised disclosure or copying of any or all of it may be unlawful. If you are not the intended recipient or if you receive this e-mail in error, please notify the sender immediately by return e-mail and delete the message. In this case, you may not peruse, disseminate, copy or print it or take any action in reliance on it.
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 13398
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 13510
