Accessing the State of a Simulink Memory Block

Is it impossible to get/set the state of a Memory block in a Simulink model? When I create the simplest possible model with a Memory block (inport, memory block, outport), none of the Simulink functions which are supposed to identify states in the model can find the state of that Memory block. Simulink.BlockDiagram.getInitialState() and the "model" command both return empty lists of states. Despite the fact that the Memory block actually lets me name its state!
Am I missing something here? This lack of functionality seems pretty destructive to my ability to interrogate my simulation programmatically, which is already incredibly limited as it is.

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 5월 16일

0 개 추천

From what I understand, the Memory block is so designed that it's state cannot be accessed/logged. I believe you need to use the Unit Delay block (which is an equivalent block) if you'd like to access the state. The Memory block reference page explains this.

댓글 수: 1

Greg
Greg 2013년 5월 16일
Oh, excellent. Much easier than I thought it would be.
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Event Functions에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

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

Start Hunting!

Translated by