필터 지우기
필터 지우기

Calling stateflow graphical function.

조회 수: 3 (최근 30일)
Sainath
Sainath 2013년 3월 18일
I created a function {f1=a1*m1;g1=m1*n1; h1=n1*l1;} in stateflow and calling the function from state with entry: A entry: [f,g,h] = f2(l,m,n);
Thought he function is called from the state function isn't working (I mean output isn't getting created).
I am observing the warning :
Data/Event 'l1' (#303) is defined in the data dictionary, but is never used in the Stateflow chart. Delete this data/event
Data/Event 'm1' (#303) is defined in the data dictionary, but is never used in the Stateflow chart. Delete this data/event
Data/Event 'm1' (#303) is defined in the data dictionary, but is never used in the Stateflow chart. Delete this data/event

답변 (1개)

Siddharth
Siddharth 2013년 3월 21일
Hi Sainath: as the error message suggests, the variables l1 and m1 are not being used.
To call the code("f1=a1*m1;g1=m1*n1; h1=n1*l1;") as a function, place it in the MATLAB function block. See how to do that below: http://www.mathworks.com/help/stateflow/ug/example-of-a-matlab-function-in-a-stateflow-chart.html. Name the function "f2".

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by