function[ures] = restrict(u,N) for k = 1:N-1 ures(k) = u(2*k); end end