From: us on
james_1:
<SNIP uneven reshaper...

one of the solutions is outlined below

% the data
d='111111000000111111000000';
% - col/row (smart error check left up to you!)
dl=[6,3,3,6,3,3];
% the engine
mr=max(dl)-1;
ixb=[1,1+cumsum(dl)];
ixb(end)=[];
ixe=ixb+dl-1;
r=arrayfun(@(b,e) [d(b:e),zeros(1,mr-(e-b))],...
ixb,ixe,'uni',false);
r=cat(1,r{:});
% the result
disp(r);
%{
111111
000
000
111111
000
000
%}

us