how to convert 1100111 to 1 1 0 0 1 1 1
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
추가 답변 (2개)
Azzi Abdelmalek
2015년 6월 26일
a={'11100';'10000';'10101'}
out=cell2mat(cellfun(@(x) x-'0',a,'un',0))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!