Is there another way to write test{1,1:10}=' ' ?
1 回表示 (過去 30 日間)
古いコメントを表示
Because obviously test{1,1:10}=' ' doesn't work:
"The right hand side of this assignment has too few values to satisfy the left hand side."
I had previously done test=cell(1,10) but ideally I want some sort of blank value in there that's not [] so when I later do a char() on each entry in the cell it won't complain that it can't do it.
採用された回答
その他の回答 (1 件)
Jan
2014 年 8 月 20 日
Or shorter, if all elements are wanted:
test = cell(1,10);
test(:) = {' '};
Or:
test = repmat({' '}, 1, 10);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!