HOW TO STRİNG TO CHAR
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gökhan BAYKARA
am 2 Mai 2020
Kommentiert: Image Analyst
am 2 Mai 2020
how do I print this expression''110 011101110001111001111010 1111000001000100011011000111010'' in a matrix of 10x10?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Mai 2020
You can't. It's only 58 characters long - 60 if you include the spaces:
expression = "1100111011100011110011110101111000001000100011011000111010"
length(expression)
length(char(expression))
expression =
"1100111011100011110011110101111000001000100011011000111010"
ans =
1
ans =
58
In the meantime, try
expression = "1100111011100011110011110101111000001000100011011000111010"
length(expression)
charVector = char(expression)
length(charVector)
charMatrix = reshape(charVector, 2, 29) % or 10 by 10
4 Kommentare
Image Analyst
am 2 Mai 2020
Is this homework? Because it looks like it and we don't want you to get into trouble by submitting my answer as your own. Please read this link.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Entering Commands 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!

