Mercurial > hg > ishara
annotate 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 |
rev | line source |
---|---|
samer@4 | 1 function Y=vecshift(O,X) |
samer@4 | 2 % vecshift - refer an array of vectors to a new origin. |
samer@4 | 3 % |
samer@4 | 4 % This SUBTRACTS the first argument (a vector) from each |
samer@4 | 5 % of the vectors (row or column) in the second argument. |
samer@4 | 6 % Works in two modes: row vector or column vector mode. |
samer@4 | 7 % |
samer@4 | 8 % vecshift :: |
samer@4 | 9 % [[N,1]] ~'new origin', |
samer@4 | 10 % [[N,M]] ~'array of vectors, array domain is M' |
samer@4 | 11 % -> [[N,M]] ~'vectors relative to new origin'. |
samer@4 | 12 % |
samer@4 | 13 Y=X-repmat(O,1,size(X,2)); |
samer@4 | 14 |