Use of any-function in simulink
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to find out wheter an input signal's value is included in an array or not.
In Matlab, I would use such code:
a = [10 20 30];
if any(x==a)
disp('a contains x');
else
disp('a doesn't contain x');
end
In Simulink, I only found this way:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/158586/image.png)
But the sum block is different to the any-function and algebraic calculations with boolean values is bad coding style. How to realise the any-function in simulink?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur General Applications dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!