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

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'

 Accepted Answer

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

More Answers (0)

Categories

Asked:

on 23 Nov 2022

Edited:

on 25 Nov 2022

Community Treasure Hunt

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

Start Hunting!