Why character or string array cannot be constructed like numerical array?
古いコメントを表示
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 件のコメント
KSSV
2020 年 4 月 2 日
Read about Cell. YOu can make cell of sting arrays.
Zeynab Mousavikhamene
2020 年 4 月 2 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!