Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Fitting an equation to data using the Levenberg-Marquardt algorithm,
Replies: 2   Last Post: Feb 20, 2013 7:51 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten

Posts: 1,477
Registered: 11/8/10
Re: Fitting an equation to data using the Levenberg-Marquardt algorithm,
Posted: Feb 19, 2013 10:46 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Nanna Pedersen <nannamp86@gmail.com> wrote in message <26f143b5-6488-4228-b29a-9161d5dda618@googlegroups.com>...
> Hi everyone.
>
> I am using lsqcurvefit to fit a signalequation to some data. I am using the Levenberg-Marqaurdt algorithm but would really like to put some boundary constraints on the output. The most important constraint is that all the output parameters are positive but I would like to constrain the values to certain ranges.
>
> lsqcurvefit does not accept boundary constraints for the Levenberg-Marquardt algorithm, so do any of you have an idea how I can cheat lsqcurvefit to accept boundary conditions indirectly somehow or (even better): do any of you know of another implementation in matlab?
>
> Thank you!
>
> Best regards, Nanna


Instead of the parameter p handed to you in the function routine of
lsqcurvefit, use
p'=(lb+ub)/2 + sin(p)*(ub-lb)/2
in the evaluation of your residuals.
Then p' ranges from lb to ub where lb is a lower bound and ub is an upper bound
for the parameter you want to fit.

Best wishes
Torsten.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.