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

10 Ansichten (letzte 30 Tage)
Kaitlyn Morgan
Kaitlyn Morgan am 16 Jun. 2018
Beantwortet: Walter Roberson am 16 Jun. 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';

Antworten (1)

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

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by