recorreder.m - Vector shifting made simple

David Valencia December 5, 2010 Coded in Matlab

This uber-simple code is useful to shift a given vector to the right, by N positions. Used for the chain-processing programs by David Valencia (DWT, DWPT, TMX, etc)

More details on the blog post:

function [xd] = recorreder(x,N)
% This function shifts a vector by N positions to the right
% As posted in
lx = length(x);
if N>lx
    fprintf('N has to be smaller than the vector length');
    xd(N+1:lx) = x(1:lx-N);


There are no comments yet!

Sorry, you need javascript enabled to post any comments.