A state machine in simulink.

조회 수: 3 (최근 30일)
Adam Klingest
Adam Klingest 2015년 5월 8일
답변: Sean de Wolski 2015년 5월 8일
I want to do the following in simulink
if SOC > max
state = 3
if min < SOC < max
state = 2
if SOC<min
state = 1
SOC is in the range [1:100]
What is the best way to do something like that without using the stateflow package? My supervisor suggested that I could use a lookup table, but I am not sure how they work, or how I could do it with a lookup table. I also might want to add some more states at a later time.
thx.

답변 (1개)

Sean de Wolski
Sean de Wolski 2015년 5월 8일
How about just use a MATLAB Function block and paste that code that you have above into it?

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by