archive - pack variables into a struct Copyright(c) 2009 Ryota Tomioka This software is distributed under the MIT license. See license.txt
0001 % archive - pack variables into a struct 0002 % 0003 % Copyright(c) 2009 Ryota Tomioka 0004 % This software is distributed under the MIT license. See license.txt 0005 function S=archive(varargin) 0006 0007 S = []; 0008 for i=1:length(varargin) 0009 name =varargin{i}; 0010 S = setfield(S, name, evalin('caller', name)); 0011 end