Can one substitute string values in a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
I create
dum=zeros(height(T),1)
I want Matlab to fill all the values of dum with a string 'January'. How is it possible?
0 件のコメント
採用された回答
madhan ravi
2020 年 12 月 7 日
dum = strings(height(T), 1); % you could also use repmat or repelem to do it in one line
dum(:) = "January";
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!