how to convert logical variable into hexadecimal number in Matlab?
Ältere Kommentare anzeigen
how to convert logical variable into hexadecimal number in Matlab?
2 Kommentare
James Tursa
am 17 Mär. 2021
Please provide a short example of a logical input and what you want for a hex output.
Adam Danz
am 18 Mär. 2021
The task seems odd to me, too. hex representation of 1/0 booleans is just '1','0'.
Antworten (1)
hexstr = dec2hex([false true true false])
Or perhaps you want,
hexstr = string(double(([false true true false])))
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!