stateflow 변수 초기화 방법
Afficher commentaires plus anciens

stateflow에서 위와 같이 모델링 할경우 아래와 같이 a 초기값을 선언해달라고 하는데.
c언어에서 처럼 static a=0 과 같이 local 변수지만 초기화만 할수 있는 방법이 없을까요?
state에서는 en : a=0으로 할수는 있을거 같은데
많이 사용하는 방법에 대해 문의 드립니다.
The data a was read before being written to. This error will stop the simulation. Transition in Chart 'untitled/Chart': [a < 9]
3 commentaires
Walter Roberson
le 31 Oct 2024
It looks like you are trying to read a in the condition [a < 9] before a has been assigned a value.
영진
le 31 Oct 2024
Walter Roberson
le 31 Oct 2024
According to https://www.mathworks.com/matlabcentral/answers/838503-persistent-data-in-stateflow#answer_708430
Variables you define as 'local' or as 'output' in the chart are persistent over chart executions.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Functions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


