annotate arrows/alatch.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents ae596261e75f
children
rev   line source
samer@42 1 % alatch - Arrow which produces the value in the last event received.
samer@0 2 %
samer@0 3 % alatch :: A -> arrow( {box(A)}, {A}, A).
samer@0 4 function o=alatch(x0)
samer@0 5 o=loop(@upd,@(sz)x0);
samer@0 6 end
samer@0 7
samer@0 8 function [y,s]=upd(x,s)
samer@0 9 if iscell(x) && ~isempty(x), s=x{end}; end
samer@0 10 y=s;
samer@0 11 end