Mercurial > hg > ishara
view general/discretise/data2maps.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | e44f49929e56 |
children |
line wrap: on
line source
function M=data2maps(RFn,X,N) % data2maps - build linear maps for covering data ranges % % data2maps :: % ([[N,M]] -> [[2,M]]) ~ 'function to compute min and max of range', % [[N,M]] ~ 'the data' % L:natural ~ 'number of bins in output maps' % -> { [M] -> dmap(L) } ~ 'one dmap per column in a cell array'. % % Two argument version computes L=sqrt(N) % % data2maps :: % ([[N,M]] -> [[2,M]]) ~ 'function to compute min and max of range', % [[N,M]] ~ 'the data' % -> { [M] -> dmap(L) } ~ 'one dmap per column in a cell array'. if nargin<3, N=sqrt(size(X,1)); end M=maprows(@(r){linmap(r(1),r(2),N)}, closed2hopen(feval(RFn,X)'));