[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: test a cloud of 2D points for linearity
From: |
Joshua Stults |
Subject: |
Fwd: test a cloud of 2D points for linearity |
Date: |
Wed, 27 May 2009 11:31:51 -0400 |
Oops, forgot to reply to the list.
---------- Forwarded message ----------
From: Joshua Stults <address@hidden>
Date: Wed, May 27, 2009 at 11:30 AM
Subject: Re: test a cloud of 2D points for linearity
To: "Georg P. Israel" <address@hidden>
Probably
[P, S] = polyfit(x, y, 1)
will do what you want. The second output argument gives lots of
useful diagnostic info on the fit; also check out polyval().
On Wed, May 27, 2009 at 10:56 AM, Georg P. Israel <address@hidden> wrote:
> Dear all,
>
> I am almost ashamed to ask this stupid question,
> but with all this wealth of function, i seem to not find the right
> stuff. Even thought, I know that it is there, probably just under my
> nose.
>
> here my problem:
>
> I have a number of points in a plain (2D points)
> This points can have an arbitrary distribution.
> I would like to have a function that will fit the line through this
> cloud of points.
>
> I expect that one point of this line is the mean of all points plus some
> direction vector.
>
> The next thing that I like to have now is the RMS of all the distances
> of the points along this line. This is basically a variance as seen
> along this line.
>
> Now, I can certainly start to clumsily develop this function, but I am
> sure that I am just overlooking the right function.
>
> Hence,
> please point my nose this this function ...
>
> Best regards
>
> Georg P. Israel
>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
--
Joshua Stults
Website: http://j-stults.blogspot.com
--
Joshua Stults
Website: http://j-stults.blogspot.com
Message not available