Thread Subject: Non-polynomial Curve Fit problem

Subject: Non-polynomial Curve Fit problem

From: lan

Date: 16 Apr, 2009 18:36:01

Message: 1 of 7

Below is my figure data:

x=[-28.87 -27.35 -18.67 -22.42 -34.53 -52.73 -60.72 -68.06 -87.41 -94.16]';
y=[-11.56 -5.57 3.26 7.15 7.69 5.82 7.99 10.45 2.70 0];
plot(x,y,'ro-');
grid;
axis equal;

I have tried the polyfit but not successful, which changed my data order firstly.
I want to make a curve fit which can keep the shape of the path in above figure. Especially in the right side where there is a ear or shoulder shape.

Thanks,

Subject: Non-polynomial Curve Fit problem

From: someone

Date: 16 Apr, 2009 18:57:01

Message: 2 of 7

"lan " <amoyjiajia@hotmail.com> wrote in message <gs7tqh$3oc$1@fred.mathworks.com>...
> Below is my figure data:
>
> x=[-28.87 -27.35 -18.67 -22.42 -34.53 -52.73 -60.72 -68.06 -87.41 -94.16]';
> y=[-11.56 -5.57 3.26 7.15 7.69 5.82 7.99 10.45 2.70 0];
> plot(x,y,'ro-');
> grid;
> axis equal;
>
> I have tried the polyfit but not successful, which changed my data order firstly.
> I want to make a curve fit which can keep the shape of the path in above figure. Especially in the right side where there is a ear or shoulder shape.
>
> Thanks,

You might download and try EzyFit from the MATLAB FEX at:

http://www.mathworks.com/matlabcentral/fileexchange/10176

You will still have to make some guess as to the type of equation you want to fit to.

What type of equation will give you the "ear or shoulder shape" you want?
Think about it!

Subject: Non-polynomial Curve Fit problem

From: John D'Errico

Date: 16 Apr, 2009 20:07:02

Message: 3 of 7

"lan " <amoyjiajia@hotmail.com> wrote in message <gs7tqh$3oc$1@fred.mathworks.com>...
> Below is my figure data:
>
> x=[-28.87 -27.35 -18.67 -22.42 -34.53 -52.73 -60.72 -68.06 -87.41 -94.16]';
> y=[-11.56 -5.57 3.26 7.15 7.69 5.82 7.99 10.45 2.70 0];
> plot(x,y,'ro-');
> grid;
> axis equal;
>
> I have tried the polyfit but not successful, which changed my data order firstly.
> I want to make a curve fit which can keep the shape of the path in above figure. Especially in the right side where there is a ear or shoulder shape.
>
> Thanks,

I would suggest a simple model:

  yhat = mean(y)

John

Subject: Non-polynomial Curve Fit problem

From: lan

Date: 16 Apr, 2009 20:25:05

Message: 4 of 7

John:

What is the idea of your simple model. I can not follow it. Thanks,

Subject: Non-polynomial Curve Fit problem

From: lan

Date: 16 Apr, 2009 20:37:01

Message: 5 of 7

I just find 'cscvn' may help to this problem. //"Natural" or periodic interpolating cubic spline curve. Though it is not the curve fit.

x=[-28.87 -27.35 -18.67 -22.42 -34.53 -52.73 -60.72 -68.06 -87.41 -94.16]';
y=[-11.56 -5.57 3.26 7.15 7.69 5.82 7.99 10.45 2.70 0]';
plot(x,y,'ro-');
grid;
axis equal;

figure;
p=[x' ; y'];
fnplt(cscvn(p));
grid;

Subject: Non-polynomial Curve Fit problem

From: John D'Errico

Date: 16 Apr, 2009 21:09:01

Message: 6 of 7

"lan " <amoyjiajia@hotmail.com> wrote in message <gs8471$b8v$1@fred.mathworks.com>...
> John:
>
> What is the idea of your simple model. I can not follow it. Thanks,

A polynomial fit for this data is simply fatuous.
I'm sorry, but it would be ridiculous in the
extreme. Just to throw random data into a
computer and expecting anything sensible to
come out, with no further input from the
scientist, analyst, or other knowledgeable
person?

You have no model for the curve, nor have you
expressed any indication that there should be a
model, mechanistic or not, for this data. It is
apparently not much more than a random walk.
The best predictor for such a random process is
probably just the mean of the data. Certainly so
if you have no other information to provide.

john

Subject: Non-polynomial Curve Fit problem

From: Predictor

Date: 23 Apr, 2009 13:01:59

Message: 7 of 7

On Apr 16, 2:36 pm, "lan " <amoyjia...@hotmail.com> wrote:
> Below is my figure data:
>
> x=[-28.87 -27.35 -18.67 -22.42 -34.53 -52.73 -60.72 -68.06 -87.41 -94.16]';
> y=[-11.56 -5.57 3.26 7.15 7.69 5.82 7.99 10.45 2.70 0];
> plot(x,y,'ro-');
> grid;
> axis equal;
>
> I have tried the polyfit but not successful, which changed my data order firstly.
> I want to make acurve fitwhich can keep the shape of the path in above figure. Especially in the right side where there is a ear or shoulder shape.

Is 'y' a function of 'x'? The order of the points seems to suggest
otherwise.


-Will Dwinnell
http://matlabdatamining.blogspot.com/

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
curve lan 16 Apr, 2009 14:40:19
curve fit lan 16 Apr, 2009 14:40:19
shape lan 16 Apr, 2009 14:40:19
order lan 16 Apr, 2009 14:40:19
rssFeed for this Thread

Contact us at files@mathworks.com