Thread Subject: Basic fitting Problem

Subject: Basic fitting Problem

From: Mahmood

Date: 24 Feb, 2010 07:10:23

Message: 1 of 5

how can i know the the exact values of a linear fit??

i.e i have to plot the best fit to some noisy data but i want to know what are the values of the best fit line, besides getting them from the equation by calculation


cheers

Subject: Basic fitting Problem

From: John D'Errico

Date: 24 Feb, 2010 07:28:25

Message: 2 of 5

"Mahmood " <tornido2@hotmail.com> wrote in message <hm2jcv$iqp$1@fred.mathworks.com>...
> how can i know the the exact values of a linear fit??
>
> i.e i have to plot the best fit to some noisy data but i want to know what are the values of the best fit line, besides getting them from the equation by calculation
>
>
> cheers

help polyfit
help polyval

John

Subject: Basic fitting Problem

From: Mahmood

Date: 24 Feb, 2010 08:13:21

Message: 3 of 5

if i have a plot like V shape, can i fit a line thro the first line and thro othe one at the same time ( not for both of them at once ) ?

tahnx



"John D'Errico" <woodchips@rochester.rr.com> wrote in message <hm2kep$o0c$1@fred.mathworks.com>...
> "Mahmood " <tornido2@hotmail.com> wrote in message <hm2jcv$iqp$1@fred.mathworks.com>...
> > how can i know the the exact values of a linear fit??
> >
> > i.e i have to plot the best fit to some noisy data but i want to know what are the values of the best fit line, besides getting them from the equation by calculation
> >
> >
> > cheers
>
> help polyfit
> help polyval
>
> John

Subject: Basic fitting Problem

From: Zubin

Date: 24 Feb, 2010 08:22:27

Message: 4 of 5

You could just use the first half of your V shape to do the fitting
(thus generating one line) and do another fit for the second half of
your V.

You could write a small script to detect change in slope if you cannot
predict where the V will actually happen in your data.

Subject: Basic fitting Problem

From: John D'Errico

Date: 24 Feb, 2010 08:26:02

Message: 5 of 5

"Mahmood " <tornido2@hotmail.com> wrote in message <hm2n31$ard$1@fred.mathworks.com>...
> if i have a plot like V shape, can i fit a line thro the first line and thro othe one at the same time ( not for both of them at once ) ?
>

If you have the proper tools, you can.

If you have the optimization toolbox, then you can download
my SLM tools from the file exchange. It can do this.

Or do you have the curve fitting toolbox?

John

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com