samer@0: function u=construct(s,sizes_in) samer@0: u=mkunit(s); samer@0: sz=s.sz; fn=s.fn; samer@0: u.sizes_out = guess_sizes(fn,sz); samer@0: u.process = @proc; samer@0: samer@0: function out=proc, out=fn(sz); end samer@0: end samer@0: samer@0: function sz_out=guess_sizes(fn,sz) samer@0: out = fn(sz); samer@0: sz_out = {size(out)}; samer@0: end samer@0: