How can I convert a matrix into a number?
Ältere Kommentare anzeigen
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 Kommentar
per isakson
am 12 Mär. 2014
Try the function sprintf
Akzeptierte Antwort
Weitere Antworten (1)
per isakson
am 12 Mär. 2014
Try
>> sprintf( '%1d', matrix )
ans =
1101011
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!