function x=construct(f,v) n=sum(f); x=zeros(1,n); l = length(v); count = 0; for j = 1 : l if f(j)~=0 x(count+1:count + f(j))=v(j); count=count+f(j); end end