How i can convert binary elements of cell into decimal elements and store the results in array?

1 Ansicht (letzte 30 Tage)
Dear Matlab Community,
i want to convert a binary elements of the cell into decimal elements and store the results in array
MB =
1×10 cell array
'0101' '0011' '0111' '0100' '0110' '0101' '0110' '0111' '0110' '1111'

Akzeptierte Antwort

Voss
Voss am 23 Nov. 2022
MB = { '0101' '0011' '0111' '0100' '0110' '0101' '0110' '0111' '0110' '1111'};
D = bin2dec(MB)
D = 10×1
5 3 7 4 6 5 6 7 6 15

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by