Can I change this?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have array_X
array_X=[1,1,1,0,1,0,0,0,1,0]
i want to change to
like this.
ans =
'1110100010'
how to change this?
댓글 수: 0
채택된 답변
KSSV
2020년 6월 10일
k = num2str(array_X) ; % convert to string
k(k ==' ') = [] ; % remove spaces
There will be more other elegant ways.
댓글 수: 0
추가 답변 (1개)
Stephen23
2020년 6월 10일
The most efficient solution is likely to be
>> X = [1,1,1,0,1,0,0,0,1,0];
>> A = sprintf('%u',X)
A = 1110100010
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!