Thread Subject: Trend Line / Curve

Subject: Trend Line / Curve

From: Samoline1 Linke

Date: 5 Nov, 2009 16:57:02

Message: 1 of 6

Is it possible to find the trend curve ?

E.g. when we do plot (x,y)

then in basic fitting we can do the fitting (trend line) for Linear and Polynomial (curbic.. etc) but I could not find any GUI where I could fit an exponential or logarithmic curve.

In MS Excel, I see such an option and in Excel it gives the value of R-square as well.

Subject: Trend Line / Curve

From: jrenfree

Date: 5 Nov, 2009 19:52:19

Message: 2 of 6

On Nov 5, 8:57 am, "Samoline1 Linke" <maganatewo...@yahoo.com> wrote:
> Is it possible to find the trend curve ?
>
> E.g. when we do   plot (x,y)
>
> then in basic fitting we can do the fitting (trend line) for Linear and Polynomial (curbic.. etc) but I could not find any GUI where I could fit an exponential or logarithmic curve.
>
> In MS Excel, I see such an option and in Excel it gives the value of R-square as well.

You can try using nlinfit to fit a function for exponential or
logarithmic curves

Subject: Trend Line / Curve

From: Samoline1 Linke

Date: 6 Nov, 2009 08:17:04

Message: 3 of 6


> You can try using nlinfit to fit a function for exponential or
> logarithmic curves

-------------------------

Yes but in that one you have to set many other parameters e.g. you have to set the equation by yourself. I am asking something like a curve estimate just like polynomial fitting in Basic Fitting section of Matlab.

I can see in matlab one can fit a st. line or a quadratic curve but why not exponential or logarithmic curve?

Subject: Trend Line / Curve

From: Richard Willey

Date: 6 Nov, 2009 15:53:24

Message: 4 of 6

Hi There

MathWorks offers a couple different products to extend the basic fitting
capabilities in core MATLAB.

Curve Fitting Toolbox is specific designed to solve curve and surface
fitting problems. The toolbox supports a wide number of different
parametric models including both exponential curves. You also have the
option to specify your own custom equation for nonlinear regression. The
Toolbox includes GUI and command line options for all fitting operations.
The Toolbox also supports a variety of post processing options (calculating
the area under a curve, differentiation, etc). And, of course, the toolbox
also supports standard goodness-of-fit measures including R^2.

If you're working with problems that feature a large number of independent
variables you'd be better off looking at Statistics Toolbox. Statistics
Toolbox provides a number of metrics to determine whether your independent
varaibles are correlated with one another. The Toolbox also supports
techniques like feature selection and feature transformation to help deal
with these types of problems.

regards,

Richard



"Samoline1 Linke" <maganatewoman@yahoo.com> wrote in message
news:hcv04u$9sq$1@fred.mathworks.com...
> Is it possible to find the trend curve ?
>
> E.g. when we do plot (x,y)
>
> then in basic fitting we can do the fitting (trend line) for Linear and
> Polynomial (curbic.. etc) but I could not find any GUI where I could fit
> an exponential or logarithmic curve.
>
> In MS Excel, I see such an option and in Excel it gives the value of
> R-square as well.

Subject: Trend Line / Curve

From: Samoline1 Linke

Date: 6 Nov, 2009 16:19:02

Message: 5 of 6

"Richard Willey" <rwilley@mathworks.com> wrote in message <hd1gpl$s3$1@fred.mathworks.com>...
> Hi There
>
> MathWorks offers a couple different products to extend the basic fitting
> capabilities in core MATLAB.
>
> Curve Fitting Toolbox is specific designed to solve curve and surface
> fitting problems. The toolbox supports a wide number of different
> parametric models including both exponential curves. You also have the
> option to specify your own custom equation for nonlinear regression. The
> Toolbox includes GUI and command line options for all fitting operations.
> The Toolbox also supports a variety of post processing options (calculating
> the area under a curve, differentiation, etc). And, of course, the toolbox
> also supports standard goodness-of-fit measures including R^2.
>
> If you're working with problems that feature a large number of independent
> variables you'd be better off looking at Statistics Toolbox. Statistics
> Toolbox provides a number of metrics to determine whether your independent
> varaibles are correlated with one another. The Toolbox also supports
> techniques like feature selection and feature transformation to help deal
> with these types of problems.
>
> regards,
>
> Richard
---------------------

Thanks Richard for such a detailed reply. I do have the statistics toolbox but very interestingly in 'polynomial fitting tool' (part of stat. toolbox), one can fit a curve but can not get the value of R-sq or the value of P which cuold confirm that this fitting is good enough to be considered.


Just do regstats (y,x) and you will see an excellent table showing the values which I actually want to calculate but sadly matlab even with statistical toolbox calculates these values only for linear models. My question is that is it possible to calculate these values for high degree polynomials without using a curve fitting toolbox?

I am askign because may be I could not explore it correctly. Could you please confirm if I am correct or not?

Subject: Trend Line / Curve

From: Frederic Moisy

Date: 9 Nov, 2009 10:06:01

Message: 6 of 6

Hi
You can use the Ezyfit toolbox for this purpose:
http://www.mathworks.com/matlabcentral/fileexchange/10176-ezyfit-2-30
You can easily fit log or exp laws, and it gives you the R-square value.
Have a look to the example file:
http://www.mathworks.com/matlabcentral/fx_files/10176/3/content/ezyfit/demo/html/efdemo.html
Frederic



"Samoline1 Linke" <maganatewoman@yahoo.com> wrote in message <hcv04u$9sq$1@fred.mathworks.com>...
> Is it possible to find the trend curve ?
>
> E.g. when we do plot (x,y)
>
> then in basic fitting we can do the fitting (trend line) for Linear and Polynomial (curbic.. etc) but I could not find any GUI where I could fit an exponential or logarithmic curve.
>
> In MS Excel, I see such an option and in Excel it gives the value of R-square as well.

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