Why character or string array cannot be constructed like numerical array?
Mostrar comentarios más antiguos
For eample:
a=[]; a(1:3)=1
but you cannot make string of character the same way:
a=[]; a(1:3)="er"
it returns:
a =
NaN NaN NaN
or
a=[]; a(1:3)='er'
returns this error:
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
Any idea to make string or character array?
2 comentarios
KSSV
el 2 de Abr. de 2020
Read about Cell. YOu can make cell of sting arrays.
Zeynab Mousavikhamene
el 2 de Abr. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!