function N=get_ord(x,N0) % GET_ORD Computes the matrix as specific by the canonical order. % % N = GET_ORD(x,N0) % % Inputs: % x : Order of the canonical form % N0 : Size of the matrix % % Outputs: % N = Returns the permuted matrix % % % (C) Gaussian Process SSTS Toolbox 1.0 % (C) Copyright 2006-2007, Keith Neo % http://www.hamilton.ie if x==0 N=eye(N0); else D0=ceil(N0/(x+1)); N=zeros(D0,N0); for k=1:D0 pp=(x+1)*(k-1)+1; N(k,pp)=1; end end