view general/numerical/array/vecshift.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
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));