MATLAB: How to store vectors of unequal sizes, created by a for loop in a cell

cell arraysconvert matrix to cell

Hello all,
I am trying to use the pkurtosis function within a for loop on my Pitch_BL 1-D time sereis vector as shown below. However, in the output, SK_BL is a different length for each iteration of the loop, and thus makes it impossible to store all of the outputs of SK_BL into a single matrix.
I am attempting to get around this by having the for loop run the pkurtosis function 25 different times, and for each time, store the output variables in a cell, SK_BL_Cell(:,k), thus allowing vectors of unequal lengths to be concatenated together.
Unfortunatley, my code is giving me an error,"Index in position 2 exceeds array bounds (must not exceed 1)", and I was wondering if someone could help.
Thanks in advance.
for k = 1:25
[SK_BL, F_out_BL, Thresh_BL] = pkurtosis(Pitch_BL(:,k),Fs,wc_BL(k,:),'ConfidenceLevel',0.95);
SK_BL_Cell(:,k) = num2cell(SK_BL(:,k));
F_out_BL_Cell(:,k) =num2cell(F_out_BL(:,k));
Thresh_BL_Cell(:,k) = num2cell(Thresh_BL(k,:));
end

Best Answer

I would just do something like this:
SK_BL_Cell{k} = SK_BL(:,k);
F_out_BL_Cell{k} = F_out_BL(:,k);
Thresh_BL_Cell{k} = Thresh_BL(k,:);