function y= refine(x);
[n,m]          = size(x);
y              = zeros(2*n-1,m);
y(1:2:2*n-1,:) = x;
y(2:2:2*n-1,:) = 0.5*(x(1:n-1,:)+x(2:n,:));
