|
Prev: finding list of numbers
Next: supply air max 87 90 95, nike shox r2 r5 oz nz shoes, puma lacoste trainers
From: us on 18 Jun 2008 16:00 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 |