function [Y,M]=addnorm(F,X)
% addnorm - additive normalisation with respect to arbitrary function
% 
% addnorm :: 
%    ([[N,M]] -> [[N,1]]) | ([[N,M]] -> [[1,M]]) 
%       ~'function to compute offsets',
%    [[N,M]]           ~'data to normalise'
% -> [[N,M]]           ~'offset vectors' 
%    [[N,1]] | [[1,M]] ~'the vector that was subtracted'.
%
% This function can work row-wise OR column-wise depending on what
% the offset computing function returns.
%
% EXAMPLES
% 
% To zero-mean each ROW of an N-by-M array X, use
%    addnorm(@(t)mean(t,2),X);
%
% To zero the MEDIAN of each COLUMN, use
%    addnorm(@median,X);

Y=vecop1(@minus,X,F(X)); % vecshift(F(X),X);

