Skip to content

Question(s) about code generation & usage in Matlab/Simulink #3686

Answered by ernestds
ottarg asked this question in Q&A
Discussion options

You must be logged in to vote

You have to provide to the rhs function the jacobian as a cached function.
In Python you'd do something like this:

ca.external('name',folder,{'cache': {'jac_name': jac_rhs_fn}})

the name, input and output sparsities must match exactly for the jacobian, so for example the jac_rhs_fn.name() should be 'jac_name'

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ottarg
Comment options

Answer selected by ottarg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants