view general/numerical/zeromax.m @ 37:beb8a3f4a345

Renamed prefs to options throughout.
author samer
date Mon, 28 Jan 2013 10:52:11 +0000
parents 8476b3d9d295
children
line wrap: on
line source
% zeromax - additive normalisation so max value us zero
%
% zeromax :: 
%    [D:[[E]]] ~'E dimensional array of size D', 
%    1..D      ~'dimension to normalise along' 
% -> [D] ~'shifted data'.
%
% non-finite values are ignored. Dimension defaults to 1.
function [y,m]=zeromax(x,dim), x=addnorm(@(y)max(y,[],dim),x); end