Simulink StateFlow Variable assign
Show older comments

Could any tell us how these codes work? What the mean of "<" in these codes? Many thanks
1 Comment
Jinjie Qi
on 28 Nov 2017
Answers (1)
Mark McBroom
on 30 Nov 2017
Edited: Mark McBroom
on 30 Nov 2017
The code gets executed when entering the "Modes" state and every simulation step while the Modes state is active. To understand the "<" sign, type the code into the MATLAB command window:
>> SonarSensors = [1 1 1 1 1];
>> SensorRanges = [2 2 2 2 2];
>> [SonarSensors(4:5)] < SensorRanges(4:5)
ans =
1×2 logical array
1 1
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!