how to convert 1100111 to 1 1 0 0 1 1 1
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear All,
I need to convert a matrix of
a=[11100;10000;10101];
to
s=[1 1 1 0 0;1 0 0 0 0;1 0 1 0 1];
to convert s to a we use
char(s+'0');
but how form a to s. Thanks in advance for any help.
regards,
Imola
0 Commenti
Risposta accettata
Più risposte (2)
Azzi Abdelmalek
il 26 Giu 2015
a={'11100';'10000';'10101'}
out=cell2mat(cellfun(@(x) x-'0',a,'un',0))
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!