Borrar filtros
Borrar filtros

numjac on a subset of variables

47 visualizaciones (últimos 30 días)
Riccardo
Riccardo el 20 de Feb. de 2015
Respondida: Vinh Nguyen el 2 de Mayo de 2017
I want to calculate the numerical Jacobian of my system using numjac.
It works fine with the regular syntax:
[Jac, FAC] = numjac(@(t,y)model(t,y,X,VAR),ttot,ytot',dydt,jac_tol,FAC);
However I don't need the full jacobian, but only the derivatives with respect to some y's. I can calculate the full one then select the needed lines, but it is a waste of computational time. How can I calculate the jacobian only where I need it?

Respuestas (1)

Vinh Nguyen
Vinh Nguyen el 2 de Mayo de 2017
I think you can do that by providing the Jacobian Structure. You can set the Jacobian Structure element 0 or 1. 1 for the derivatives respective to your variables you need.

Categorías

Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by