What is the difference between "<>", "!=" and "~=" in a Stateflow chart?

I have a Stateflow chart where the symbol "<>" is used. I tried to replace this symbol with "!=" but it seems to give identical results. What is the risk of change in behavior of the model or of the generated code if all "<>" are placed with "!=" ?

 Accepted Answer

The "<>" symbol is indeed equivalent to "!=". Nevertheless, it would be more robust to replace both of these expressions with "~=".
This is because, both "<>" and "!=" are binary operations which are only supported when using C as the action language of the chart:
On the other hand, "~=" is supported both when using MATLAB or C as the action language.
For more information about using MATLAB or C as an action language see:

More Answers (0)

Categories

Products

Release

R2016b

Community Treasure Hunt

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

Start Hunting!