DEMUX splits the input vector of AOs into a number of output AOs. usage: [a1,a2,...] = demux(as) M Hewitson 28-03-07
0001 function varargout = demux(as) 0002 0003 % DEMUX splits the input vector of AOs into a number of output AOs. 0004 % 0005 % usage: [a1,a2,...] = demux(as) 0006 % 0007 % 0008 % M Hewitson 28-03-07 0009 % 0010 % 0011 0012 ALGONAME = mfilename; 0013 VERSION = '$Id: demux.html,v 1.1 2007/06/08 14:15:02 hewitson Exp $'; 0014 0015 0016 % get number of input AOs 0017 si = size(as); 0018 n = si(1)*si(2); 0019 0020 if nargout > n 0021 error('### too many output arguments'); 0022 end 0023 0024 for j=1:nargout 0025 % map to output AO 0026 varargout{j} = as(j); 0027 end 0028 0029 % END