function z=getord_vec(x,y) % GETORD_VEC Takes every (x+1)-th step of the vector, y % % z = GETORD_VEC(x,y) % % Inputs: % x : record every (x+1)-th step % y : input vector (can have multiple colums) % % Output: % z : output vector % % % (C) Gaussian Process SSTS Toolbox 1.0 % (C) Copyright 2006-2007, Keith Neo % http://www.hamilton.ie if x==0 z=y; else x1=x+1; D0=ceil(size(y,1)/x1); z=zeros(D0,size(y,2)); for k=1:D0 pp=x1*k-x; z(k,:)=y(pp,:); end end