How to convert symbolic Jacobian to use it in lsqnonlin?

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
Alan Weiss el 19 de Mayo de 2015
There are some documentation examples on closely-related questions.
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.

Preguntada:

el 19 de Mayo de 2015

Respondida:

el 19 de Mayo de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by