Home > rest_20090422 > rest_spm5_files > @create_file_array > private > fname.m

fname

PURPOSE ^

Format

SYNOPSIS ^

function varargout = fname(varargin)

DESCRIPTION ^

 Format
 For getting the value
 dat = fname(obj)

 For setting the value
 obj = fname(obj,dat)
 _______________________________________________________________________
 Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

DOWNLOAD ^

fname.m

SOURCE CODE ^

0001 function varargout = fname(varargin)
0002 % Format
0003 % For getting the value
0004 % dat = fname(obj)
0005 %
0006 % For setting the value
0007 % obj = fname(obj,dat)
0008 % _______________________________________________________________________
0009 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience
0010 
0011 %
0012 % $Id: fname.m 253 2005-10-13 15:31:34Z guillaume $
0013 
0014 
0015 
0016 if nargin==2,
0017     varargout{1} = asgn(varargin{:});
0018 elseif nargin==1,
0019     varargout{1} = ref(varargin{:});
0020 else
0021     error('Wrong number of arguments.');
0022 end;
0023 return;
0024 
0025 function dat = ref(obj)
0026 dat = obj.fname;
0027 return;
0028 
0029 function obj = asgn(obj,dat)
0030 if ischar(dat)
0031     obj.fname = deblank(dat(:)');
0032 else
0033     error('"fname" must be a character string.');
0034 end;
0035 return;

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