Thread Subject: Nonlinear Least Squares Data fit

Subject: Nonlinear Least Squares Data fit

From: Meredith

Date: 22 Aug, 2009 23:46:02

Message: 1 of 2

I am using a Nonlinear Leastsqare fit algorithm from the matlab library to fit the curves in my data using a Maxwellian distribution.
Fit equation ~
 d1*(m/T1)^1.5*(exp(.5m(v-u)^2)/T1))+d2*(m/(T2)^1.5*(exp(.5m(v-u)^2/T2))

There are 5 constrain fit parameters in the equation (d1, d2, T1, T2, ul).
The problem I am having is that there doesn't seem to be one specific set of constraints that work for the model. Each time a run the program I can get some wildly different values for my constraints. I have a pretty good idea of the approximate values of each parameter. I was wondering if anyone had some good ideas on either a better fitting algorithm, or suggestions on how to better run on constrain the nonlinear least squares fit algorithm?

Subject: Nonlinear Least Squares Data fit

From: Frederic Moisy

Date: 25 Aug, 2009 22:19:04

Message: 2 of 2

What matlab function do you use? do you specify the starting
values for your parameters?
You can try the Ezyfit toolbox:
http://www.mathworks.com/matlabcentral/fileexchange/10176


"Meredith " <kepera@gmail.com> wrote in message <h6pvvp$prk$1@fred.mathworks.com>...
> I am using a Nonlinear Leastsqare fit algorithm from the matlab library to fit the curves in my data using a Maxwellian distribution.
> Fit equation ~
> d1*(m/T1)^1.5*(exp(.5m(v-u)^2)/T1))+d2*(m/(T2)^1.5*(exp(.5m(v-u)^2/T2))
>
> There are 5 constrain fit parameters in the equation (d1, d2, T1, T2, ul).
> The problem I am having is that there doesn't seem to be one specific set of constraints that work for the model. Each time a run the program I can get some wildly different values for my constraints. I have a pretty good idea of the approximate values of each parameter. I was wondering if anyone had some good ideas on either a better fitting algorithm, or suggestions on how to better run on constrain the nonlinear least squares fit algorithm?

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
fit Meredith 22 Aug, 2009 19:49:02
least square Meredith 22 Aug, 2009 19:49:02
rssFeed for this Thread

Contact us at files@mathworks.com