I want to create a 2×7 cell array. Each element of the cell will be an empty structure with a field name of "myfield". I can do it using nested loops:
for i=1:2 for j=1:7 mycell{i,j} = struct('myfield',[]) endend
Is there any way to avoid the loops? It looks ugly in my code.
Best Answer