Create struct from column vectors
&gt;&gt; a1 = ones(100,1);
&gt;&gt; a2 = ones(100,1);
&gt;&gt; a3 = ones(100,1);
&gt;&gt; b.a1 = a1;
&gt;&gt; b.a2 = a2;
&gt;&gt; b.a3 = a3;
&gt;&gt; b


b = 

a1: [100x1 double]
a2: [100x1 double]
a3: [100x1 double]