How do I fit this equation?
4 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Marc
2014-1-8
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 个评论
Marc
2014-1-10
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"....
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biomedical Imaging 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!