How do I preallocate a struct array from the importdata function (In a loop)
조회 수: 6(최근 30일)
표시 이전 댓글
Hi, I would like to preallocate my data space that comes from the importdata command, but I am having trouble because it is just a little too complicated for me. After I run the importdata in the loop I end up with:
1x10 struct array with fields: data textdata
x.data is a 21x1248 double array
x.textdata is a 4x22 cell array
This comes from something similar to:
x(fnum)=importdata(fname, ',', 4);
what is the command I should run to preallocate this structure array?
Find more on Use COM Objects in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!