Home > functions > device > acqdata > vb_saveman_get_dir.m

vb_saveman_get_dir

PURPOSE ^

return data directry from <<struct>> saveman

SYNOPSIS ^

function [dir] = vb_saveman_get_dir(saveman)

DESCRIPTION ^

 return data directry from <<struct>> saveman
 [usage]
   [dir] = saveman_get_data_dir(saveman)
 [input]
   saveman : <required> <<struct>> specification for saving files
 [output]
       dir : value of .data_dir field
 [note]

 [history]
   2007-05-17 (Sako) initial version
   2007-08-22 (Sako) added aim argument
   2011-02-17 (Sako) got rid of 2nd argument 'aim'

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [dir] = vb_saveman_get_dir(saveman)
0002 % return data directry from <<struct>> saveman
0003 % [usage]
0004 %   [dir] = saveman_get_data_dir(saveman)
0005 % [input]
0006 %   saveman : <required> <<struct>> specification for saving files
0007 % [output]
0008 %       dir : value of .data_dir field
0009 % [note]
0010 %
0011 % [history]
0012 %   2007-05-17 (Sako) initial version
0013 %   2007-08-22 (Sako) added aim argument
0014 %   2011-02-17 (Sako) got rid of 2nd argument 'aim'
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 % --- CHECK ARGUMENTS --- %
0020 if ~exist('saveman', 'var'), saveman = []; end
0021 [saveman] = inner_check_arguments(saveman);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 dir = saveman.data_dir;
0026 return;
0027 %
0028 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0029 
0030 
0031 % --- INNER FUNCTIONS -------------------------------------------------------- %
0032 %
0033 function [saveman] = inner_check_arguments(saveman)
0034 
0035 func_ = mfilename;
0036 
0037 if isempty(saveman)
0038   error('(%s)saveman is a required parameter', func_);
0039 end
0040 
0041 % --- check field
0042 if ~isfield(saveman, 'data_dir')
0043   % set empty data
0044   saveman.data_dir = [];
0045 end
0046 return;
0047 %
0048 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0049 
0050 % --- END OF FILE --- %

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005