how to increase the no. elements in the array structure
조회 수: 1 (최근 30일)
이전 댓글 표시
>> class(Sis)
ans =
'struct'
size(Sis(1).dailyprof)
ans =
6000
i want all Sis.dailyprof with size =7000 with all other element=0
example:
size(Sis(1).dailyprof) = 7000
size(Sis(2).dailyprof) = 7000
size(Sis(3).dailyprof) = 7000
댓글 수: 0
채택된 답변
Walter Roberson
2023년 11월 23일
You did not specify the MATLAB release you are using, so I will take advantage of a new function introduced in R2023b:
for K = 1 : numel(Sis);
Sis(K).dailyprof = resize(Sis(K).dailyprof, 7000);
end
If you are using an earlier release, different code would be needed.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!