f



Line of best fit

I'm a total newbie at this guys.
I have the following data in an .m file:

x = 0:2:20;
y = [0.02 0.26 0.35 0.53 0.66 0.78 0.88 0.96 1.03 1.06 1.14];
plot(x,y,'rx');

How would i fit a line of best fit to this graph?

I know this is rudimentary stuff but as i said i'm a total newbie!!!

Cheers for any help

0
12/15/2004 3:17:46 PM
comp.soft-sys.matlab 211266 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
455 Views

Similar Articles

[PageSpeed] 58

help polyfit

/Johan

Jamie Sutton wrote:
> I'm a total newbie at this guys.
> I have the following data in an .m file:
> 
> x = 0:2:20;
> y = [0.02 0.26 0.35 0.53 0.66 0.78 0.88 0.96 1.03 1.06 1.14];
> plot(x,y,'rx');
> 
> How would i fit a line of best fit to this graph?
> 
> I know this is rudimentary stuff but as i said i'm a total newbie!!!
> 
> Cheers for any help
> 
0
12/15/2004 3:41:38 PM
Reply: