[Ask Help] - Convert Negative Commas Decimal into Single Binary
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
Is anyone please could help me to convert this data from (Negative Commas Decimal).
Maximum set to '1' and other set to '0 or zero'.
This is my data:
data = [1.295175 -0.021158 -0.274017]
And i wanna convert into single binary like this :
data = [ 1 0 0 ]
Thanks.
0 commentaires
Réponse acceptée
Arif Hoq
le 8 Déc 2022
data = [1.295175 -0.021158 -0.274017];
data(data<0)=0;
data(data>1)=1
8 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!