Mercurial > hg > ishara
view signals/@sigtake/construct.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 289445d368a7 |
children |
line wrap: on
line source
function s=construct(sig) sc=construct(sig.sig); length=uint32(sig.len); s.start = sc.start; s.stop = sc.stop; s.dispose = sc.dispose; s.reader = @reader; function r=reader(n) rc=sc.reader(n); r = @next; n=uint32(n); function [x,rem]=next [x,rem]=rc(); if length>n length=length-n; elseif length>0 rem=max(rem,n-length); length=0; last=x(:,end); else rem=n; end end end end