How create a cell array
Afficher commentaires plus anciens
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 commentaires
Matt J
le 13 Sep 2020
It is peculiar that you would want it to be a cell array. A numeric vector would be much more efficient.
Angela Marino
le 13 Sep 2020
Réponse acceptée
Plus de réponses (1)
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);
1 commentaire
Angela Marino
le 13 Sep 2020
Catégories
En savoir plus sur Matrices and Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!