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 "!=" ?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 14 Oct 2022
Modifié(e) : MathWorks Support Team le 14 Oct 2022

0 votes

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:

Plus de réponses (0)

Catégories

En savoir plus sur Stateflow dans Centre d'aide et File Exchange

Produits

Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by