Matlab line of best fit

• Nov 14th 2010, 05:09 AM
Matlab line of best fit
How do i do the line of best fit in matlab?

• Nov 14th 2010, 06:51 AM
CaptainBlack
Quote:

Originally Posted by adam_leeds
How do i do the line of best fit in matlab?

I think we need to know more, and ask if you have searched the Matlab help system?
• Nov 14th 2010, 07:18 AM
Quote:

Originally Posted by CaptainBlack
I think we need to know more, and ask if you have searched the Matlab help system?

Yes i have, it's not really useful :(

I've got a load of numbers say about 400. Which i've sorted into size order.

Against

x=[1:1:400]
then x/400
• Nov 14th 2010, 10:57 AM
CaptainBlack
Quote:

Originally Posted by adam_leeds
Yes i have, it's not really useful :(

I've got a load of numbers say about 400. Which i've sorted into size order.

Against

x=[1:1:400]
then x/400

Well the equations for a regression line are given >>here<< (but note that in (C) the y and x have lines over them to denote the means, they are just not obvious)

CB