Mercurial > hg > ishara
comparison general/funutils/scanner_add_plotter.m @ 37:beb8a3f4a345
Renamed prefs to options throughout.
author | samer |
---|---|
date | Mon, 28 Jan 2013 10:52:11 +0000 |
parents | 8f4a21082c45 |
children |
comparison
equal
deleted
inserted
replaced
36:9e7be347b3a0 | 37:beb8a3f4a345 |
---|---|
8 % drawnow :: bool/true ~'whether or not to call drawnow afterwards' | 8 % drawnow :: bool/true ~'whether or not to call drawnow afterwards' |
9 % } | 9 % } |
10 % -> (S,X->X) ~'new scanning function'. | 10 % -> (S,X->X) ~'new scanning function'. |
11 | 11 |
12 function f1=scanner_add_plotter(f,opts) | 12 function f1=scanner_add_plotter(f,opts) |
13 opts=prefs('draw',0,varargin{:}); | 13 opts=options('draw',0,varargin{:}); |
14 if ~opts.draw, f1=f; else ps=pauser(opts); f1=@g; end | 14 if ~opts.draw, f1=f; else ps=pauser(opts); f1=@g; end |
15 function y1=g(y,x), y1=f(y,x); opts.plotfn(x,y,y1); ps(); end | 15 function y1=g(y,x), y1=f(y,x); opts.plotfn(x,y,y1); ps(); end |
16 end | 16 end |