Home > dal > archive.m

archive

PURPOSE ^

archive - pack variables into a struct

SYNOPSIS ^

function S=archive(varargin)

DESCRIPTION ^

 archive - pack variables into a struct

 Copyright(c) 2009 Ryota Tomioka
 This software is distributed under the MIT license. See license.txt

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Sat 22-Aug-2009 22:15:36 by m2html © 2003