# Matlab line of best fit

Printable View

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

Thanks Ad
• Nov 14th 2010, 05:51 AM
CaptainBlack
Quote:

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

Thanks Ad

I think we need to know more, and ask if you have searched the Matlab help system?
• Nov 14th 2010, 06:18 AM
adam_leeds
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, 09: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