How can I constrain the Levenberg-Marquardt algorithm?
7 views (last 30 days)
Show older comments
I am currently using the Levenberg-Marquardt algorithm (in lsqcurvefit.m) to fit a signal equation to some MRI data.
I need to put some boundary constraints on the output (the parameters I get as a result of the fitting) but this is not possible in lsqcurvefit when using the Levenberg-Marquardt method.
Do any of you know another function in matlab that uses the Levenberg-Marquardt algorithm and can apply constraints to it? or maybe you know how I can make a work-around and still use the lsqcurvefit?
I have pasted some of my code if that (for some reason) should be of any help.
ub = [10 1 0.1 0.001];
lb = [0 0 0 0];
constants = [t_sat,tr_p,gamma,Rb,g,Ra_obs,p1,p2];
s_ramani_wm = @(p,M0_wm)s_ramani(p,M0_wm,constants,offset,theta); [sign_wm,resnorm_wm,residual_wm,exflag_wm,output_wm,lambda_wm,jacobian_wm]...
= lsqcurvefit(s_ramani_wm, p0w, M0_wm, ydata_wm, lb, ub);
Thank you for your time.
Best regards, Nanna
0 Comments
Answers (0)
See Also
Categories
Find more on Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!