I can define my data structure by two different ways:
Number 1:
for i = 1:3, matrix.a{1,i} = rand(1,2000000); end
for i = 1:3, matrix.a{2,i} = rand(1,2000000); end
for i = 1:3, matrix.g{2,i} = rand(1); end
for i = 1:3, matrix.g{1,i} = rand(1); end
Number 2:
for i = 1:3, matrix2(1,i).a = rand(1,2000000); end
for i = 1:3, matrix2(2,i).a = rand(1,2000000); end
for i = 1:3, matrix2(1,i).g = rand(1); end
for i = 1:3, matrix2(2,i).g = rand(1); end
Is one of them a much more efficient way?
Thanks!