필터 지우기
필터 지우기

Jacobian of simulink model

조회 수: 3 (최근 30일)
Joshua
Joshua 2012년 2월 28일
Hello, I followed the documentation of the sldemo_metro model and tried it on a simple state-space block with a diagonal A matrix.
When running: J = Simulink.Solver.getSlvrJacobianPattern...
I get a full 2x2 Jacobian matrix! The same thing happens for an s-function, which I know is quite sparse (I wrote it myself).
Ideally, I want to define the Jacobian sparsity of my simulink model, not just access it from the solver.
Anyone have any ideas?
Thanks, Josh

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 3월 6일
AFAIK, it is not possible to set the Jacobian matrix of a model - it is computed based on the blocks that it contains. Individual blocks can set this however. I believe with S-functions, you should be able to do this by defining mdlProjection or Projection.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by