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에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!