how to use bin2dec for binary numbers called by elements
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
nadia nadi
am 1 Jun. 2016
Kommentiert: CS Researcher
am 1 Jun. 2016
hello every one,
I have a binary matrix
A=[0 0 0;1 0 0;0 1 0;1 1 0;0 0 1;0 1 1;1 0 1; 1 1 1];
and I call each column using
i=1:8
g=[a(i),b(i),c(i)];
h=dec2bin(g)
end
but it gives error, I know that in case
a=['1 0 1'];
a=bin2dec(a)
I get the right result but in my case I don't know how, and I need it to be not expensive please.
I appreciate any ideas. Many thanks,
Nadia
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!