Using Symbolic Toolbox for Optimization Solvers
9 views (last 30 days)
Show older comments
Hi, I have a large system of nonlinear equations from an Economic model (over 500 unknowns) that I want to solve using fsolve or lsqnonlin. Supplying the Jacobian matrix is not feasible, but approximating the Jacobian with finite differences is also not feasible since each function evaluation takes about half an hour and each iteration would need over 500 evaluations. I want to use the symbolic toolbox and am using this helpful example: http://www.mathworks.com/tagteam/62669_91801v00_SymbolicGradient_Hessian_final.pdf.
However my problem is more complicated, as the objective function (of which I want to take the Jacobian) must call other files that use the current guess to solve equations given that guess. Therefore I haven't been able to write the objective function symbolically (as "objfun" is written in the above example), since the objective function needs a guess of the solution. Are there any help files that use more complicated objective functions or does anyone have any suggestions? Should I not try to use the symbolic toolbox for complicated functions? Thanks for the help!
1 Comment
Matt J
on 28 Oct 2012
Can we see the equations? Why is it so much harder to supply the non-symbolic Jacobian than to compute the objective function itself?
Answers (2)
Alan Weiss
on 29 Oct 2012
I'm glad you like the example. There are some other examples on using symbolic math with optimization, but I doubt that any give more information than the one you are using. Nevertheless, here are a couple of pointers to more examples:
Your problem of needing starting guesses for your solution makes it sound as if you don't have an analytic form for your objective function, so I don't see how you can use symblic math in any case, but maybe I just don't understand properly.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 Comments
See Also
Categories
Find more on Nonlinear Optimization 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!