from
ChebyshevTools
by Michael Watson Tool box for solving ODE/PDEs using spectral Chebyshev differentiation matrices.
A_res=restrictA(A,m)
function A_res=restrictA(A,m)
%this function extracts the submatrix A(1+m:end,1:end-m)
% where m is the order of the Galkerin Space
A_res=sparse(A(1+m:end,1:end-m));