Home > rest_20090422 > rest_spm5_files > @create_file_array > mystruct.m

mystruct

PURPOSE ^

_______________________________________________________________________

SYNOPSIS ^

function t = mystruct(obj)

DESCRIPTION ^

 _______________________________________________________________________
 Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mystruct.m

SOURCE CODE ^

0001 function t = mystruct(obj)
0002 % _______________________________________________________________________
0003 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience
0004 
0005 %
0006 % $Id: mystruct.m 253 2005-10-13 15:31:34Z guillaume $
0007 
0008 
0009 if numel(obj)~=1,
0010     error('Too many elements to convert');
0011 end;
0012 fn = fieldnames(obj);
0013 for i=1:length(fn)
0014     t.(fn{i}) = subsref(obj,struct('type','.','subs',fn{i}));
0015 end;
0016 return;

Generated on Wed 29-Apr-2009 01:06:38 by m2html © 2005