How to convert symbolic Jacobian to use it in lsqnonlin?
Mostrar comentarios más antiguos
I have created Jacobian using Matlab build in function:
J = jacobian([functforJacobian],[p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 ]); This Jacobian is symbolic: J 53x12 112 sym Now I need to use this Jacobian in lsqnonlin:
opts = optimoptions(@lsqnonlin,'Jacobian','on'); [p,resnorm,res] = lsqnonlin(@myfun3,pguess,[],[],opts); but lsqnonlin do not understand sym. How should I convert my Jacobian to use it in lsqnonlin? Thanks for the help
Respuestas (1)
Alan Weiss
el 19 de Mayo de 2015
0 votos
There are some documentation examples on closely-related questions.
Symbolic gradients and Hessians using files.
Symbolic derivatives using function handles.
I'm sure that either of these examples will help.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!