How can I convert a matrix into a number?
이전 댓글 표시
suppose I have a matrix:
matrix=[1 1 0 1 0 1 1]
then I want it to be
1101011.
I used mat2str, num2str but it didn't satisfied me.
Thankyou! More power to you guys!
댓글 수: 1
per isakson
2014년 3월 12일
Try the function sprintf
채택된 답변
추가 답변 (1개)
per isakson
2014년 3월 12일
Try
>> sprintf( '%1d', matrix )
ans =
1101011
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!