function E = expand(L,A,s,blksize)

[nr,nc] = size(A);
[lr,lc] = size(L);

space = (L(1)*blksize) + 1;

if (nr < space)
    E = zeros(space,nc);
    E(1:nr,:) = A;
else 
    E = A;
end

start = (L(1)- 1)*blksize + 2;

E(start:space,s) = L(2:lr);
