How do I fit this equation?

1 view (last 30 days)
Sam Falzone
Sam Falzone on 8 Jan 2014
Commented: Marc on 10 Jan 2014
I have to fit exponentially decaying data using a non-negative least squares function. Usually, the equation M(t) = sum(M0i.*exp(-t./T2i)) works, but for this dataset, there is an additional rate of the form 1/T2d = 1/(A.*t.^2). How would you account for this additional term when fitting the additional decay rate.
If you recognize the problem, this is MRI data with diffusion within a gradient. I believe the function I'm after is M(t) = sum(M0i.*exp(-t.*(1/T2i + 1/T2d)).
Any ideas?

Answers (1)

Marc
Marc on 8 Jan 2014
So you have t, M(t) and you want to find what?
If you have your function set up to give you predicted M(t) for a given set of parameters (M0i, T2i, T2d, A) then you can try nlinfit from the stats toolbox or lscurvefit/lsnonlin from the optimization toolbox should be a good start. Since I am not familiar with the data or with how many i's you have in that sum, it's hard to tell.
  2 Comments
Sam Falzone
Sam Falzone on 8 Jan 2014
It's many i's; like 160. lsqnonneg, but I'm not sure how to set up the inputs to this function specifically the "C" input being that T2D is a function of time in and of itself.
Marc
Marc on 10 Jan 2014
You really have not helped yourself here. What "C"?
Stop being vague if you want REAL help. Show us what you have tried and what appears to be hanging you up.
Again, what are you TRYING TO FIND? Are you trying to fit parameters to an equation based on your measured data? Sounds like it. So spell it out. I cannot guess what your function is and what your data is.
As the great Tom Cruz once said..... "Help me, help you"....

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!