How create a cell array
1 回表示 (過去 30 日間)
古いコメントを表示
How can I have a script that allows me to obtain a cell array (3600,1) of this type?
1
2
3
4
.
.
.
24
1
2
3
4
.
.
.
24
2 件のコメント
Matt J
2020 年 9 月 13 日
It is peculiar that you would want it to be a cell array. A numeric vector would be much more efficient.
採用された回答
その他の回答 (1 件)
Matt J
2020 年 9 月 13 日
編集済み: Matt J
2020 年 9 月 13 日
It might be beter to have a struct,
strArray=["scenario base","perturbazione veicoli","perturbazione strada","perturbazione pedoni"];
[UU,VV]=ndgrid(strArray,1:num_cluster_p);
idx=sub2ind(size(UU),idx_pers(:,1),nome_allSim(:,1));
sumocfg_group.column1=UU(idx);
sumocfg_group.column2=VV(idx);
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!