Populate Cells of Structure Array with Empty Tables
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I want to have a Structure Array with 1 x C structure array with N x 10 tables.
Since the total number of columns in the Structure Array varies with the imported data, I'm not sure how to accomplish this.
The first thing I did was make a zero-filled N x 10 table, with which I want to use to populate each cell of the Structure Array.
I wanted to do something like this next:
Table = zeros(N,10)
for i=1:C
Struc_Array.a(i) = Table
end
So essentially, this For Loop is used to A. Create the Structure Array to the appropriate size, and B. Fill each cell with the zero Table.
Table = zeros(N,10)
for i=1:C
Struc_Array(i).a = Table
end
Perhaps my main issue is with how Structure Arrays work and their syntax.
Thanks.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!