How do I convert a numerical array to a char array?

4 visualizaciones (últimos 30 días)
Kaitlyn Morgan
Kaitlyn Morgan el 16 de Jun. de 2018
Respondida: Walter Roberson el 16 de Jun. de 2018
Say I have a matrix
A = [ 0 0 0 0 0 0 0 1 ;
0 0 0 0 0 0 1 0 ]
How would I convert this to a character array such as
B = ['00000001';
'00000010]
I am looking for something that does the opposite of
A = B - '0';

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Jun. de 2018
char(A + '0')

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by