function m = lpcreconstruct(w,v,N)
%w is the sent block x1,...,xp and v is the block of numbers
% a1,...,ap; N is the length of the entire data block
p = length(w);

% z will be the reconstructed data x1,...xp,tilde x(p+1),...tilde x(N)
% copy the transmitted chunk
z=w;

% recursively reconstruct the rest
for k = p+1:N
    z(k) = z(k-1:-1:k-p)*v;
end
m=z;
%
