annotate 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 |
|
rev |
line source |
samer@4
|
1 function M=data2maps(RFn,X,N)
|
samer@4
|
2 % data2maps - build linear maps for covering data ranges
|
samer@4
|
3 %
|
samer@4
|
4 % data2maps ::
|
samer@4
|
5 % ([[N,M]] -> [[2,M]]) ~ 'function to compute min and max of range',
|
samer@4
|
6 % [[N,M]] ~ 'the data'
|
samer@4
|
7 % L:natural ~ 'number of bins in output maps'
|
samer@4
|
8 % -> { [M] -> dmap(L) } ~ 'one dmap per column in a cell array'.
|
samer@4
|
9 %
|
samer@4
|
10 % Two argument version computes L=sqrt(N)
|
samer@4
|
11 %
|
samer@4
|
12 % data2maps ::
|
samer@4
|
13 % ([[N,M]] -> [[2,M]]) ~ 'function to compute min and max of range',
|
samer@4
|
14 % [[N,M]] ~ 'the data'
|
samer@4
|
15 % -> { [M] -> dmap(L) } ~ 'one dmap per column in a cell array'.
|
samer@4
|
16
|
samer@4
|
17 if nargin<3, N=sqrt(size(X,1)); end
|
samer@4
|
18 M=maprows(@(r){linmap(r(1),r(2),N)}, closed2hopen(feval(RFn,X)'));
|
samer@4
|
19
|