MATLAB: Creating multidimentional structures

arraysstructures

How can I create a structure sized 100 x 100? Example of s = struct('f1', {1 3; 2 4}, 'f2', 25); creates a 2 x 2 structure, but s = struct('f1', {1:100; 1:100}, 'f2', 25); creates a 2 x 1 structure.
Can I change the array [1:100] to a list?

Best Answer

s = struct('f1', num2cell(rand(100)), 'f2', 25);
You'll need 10000 data points. Above you provided 200.