How can I convert a matrix into a number?
Afficher commentaires plus anciens
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 commentaire
per isakson
le 12 Mar 2014
Try the function sprintf
Réponse acceptée
Plus de réponses (1)
per isakson
le 12 Mar 2014
Try
>> sprintf( '%1d', matrix )
ans =
1101011
Catégories
En savoir plus sur Matrices and Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!