This example looks at the sparsity_jac method
View output (PDF) | source (python)
- See also
casadi::SXfunction::sparsity_jac();
30 from pylab
import spy, show
35 y = x[:-2]-2*x[1:-1]+x[2:]
43 f = ca.Function(
"f", [x],[y])
47 spy(f.sparsity_jac(0, 0))