<getter> for MEGinfo - return binary data stored directory [usage] [data_dir] = vb_meginfo_get_bin_data_dir(meginfo) [input] meginfo : <required> <<struct>> MEGinfo which must have saveman field [output] data_dir : data directory on which binary data is stored [note] @see vb_meginfo_get_precision.m [history] 2008-02-19 (Sako) initial version Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [data_dir] = vb_meginfo_get_bin_data_dir(meginfo) 0002 % <getter> for MEGinfo - return binary data stored directory 0003 % [usage] 0004 % [data_dir] = vb_meginfo_get_bin_data_dir(meginfo) 0005 % [input] 0006 % meginfo : <required> <<struct>> MEGinfo which must have saveman field 0007 % [output] 0008 % data_dir : data directory on which binary data is stored 0009 % [note] 0010 % @see vb_meginfo_get_precision.m 0011 % [history] 0012 % 2008-02-19 (Sako) initial version 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 % --- CHECK ARGUMENTS --- % 0018 if ~exist('meginfo', 'var'), meginfo = []; end 0019 [meginfo] = inner_check_arguments(meginfo); 0020 0021 % --- MAIN PROCEDURE --------------------------------------------------------- % 0022 % 0023 if isfield(meginfo, 'saveman') 0024 data_dir = meginfo.saveman.data_dir; 0025 else 0026 data_dir = ''; 0027 end 0028 return; 0029 % 0030 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0031 0032 % --- INNER FUNCTIONS -------------------------------------------------------- % 0033 % 0034 % --- inner_check_arguments() 0035 % 0036 function [meginfo] = inner_check_arguments(meginfo) 0037 func_ = mfilename; 0038 if isempty(meginfo) 0039 error('(%s)meginfo is a required parameter', func_); 0040 end 0041 return; 0042 % 0043 % --- end of inner_check_arguments() 0044 % 0045 % --- END OF INNER FUNCTIONS -------------------------------------------------------- % 0046 0047 %%% END OF FILE %%%