Mercurial > hg > ishara
view general/numerical/array/vecshift.m @ 54:9bcf5e133bf0
Added from old stats library.
author | samer |
---|---|
date | Mon, 23 Feb 2015 16:08:09 +0000 |
parents | db7f4afd27c5 |
children |
line wrap: on
line source
function Y=vecshift(O,X) % vecshift - refer an array of vectors to a new origin. % % This SUBTRACTS the first argument (a vector) from each % of the vectors (row or column) in the second argument. % Works in two modes: row vector or column vector mode. % % vecshift :: % [[N,1]] ~'new origin', % [[N,M]] ~'array of vectors, array domain is M' % -> [[N,M]] ~'vectors relative to new origin'. % Y=X-repmat(O,1,size(X,2));