Home > vbmeg > functions > device > acqdata > vb_saveman_get_precision.m

vb_saveman_get_precision

PURPOSE ^

return precision from <<struct>> saveman

SYNOPSIS ^

function [prec] = vb_saveman_get_precision(saveman)

DESCRIPTION ^

 return precision from <<struct>> saveman
 [usage]
   [dtype] = vb_saveman_get_precision(saveman)
 [input]
   saveman : <required> <<struct>> specification for saving files
 [output]
      prec : <<string>> precision which was (or will be) used when storing
           :  e.g. 'float64', 'float32' etc.
 [note]
   if precision field does not exist, this function return ''(empty string).
 [history]
   2007-06-25 (Sako) initial version

 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 [prec] = vb_saveman_get_precision(saveman)
0002 % return precision from <<struct>> saveman
0003 % [usage]
0004 %   [dtype] = vb_saveman_get_precision(saveman)
0005 % [input]
0006 %   saveman : <required> <<struct>> specification for saving files
0007 % [output]
0008 %      prec : <<string>> precision which was (or will be) used when storing
0009 %           :  e.g. 'float64', 'float32' etc.
0010 % [note]
0011 %   if precision field does not exist, this function return ''(empty string).
0012 % [history]
0013 %   2007-06-25 (Sako) initial version
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 % --- CHECK ARGUMENTS --- %
0019 if ~exist('saveman', 'var'), saveman = []; end
0020 [saveman] = inner_check_arguments(saveman);
0021 
0022 % --- MAIN PROCEDURE --------------------------------------------------------- %
0023 %
0024 prec = saveman.precision;
0025 return;
0026 %
0027 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0028 
0029 
0030 % --- INNER FUNCTIONS -------------------------------------------------------- %
0031 %
0032 function [saveman] = inner_check_arguments(saveman)
0033 
0034 func_ = 'vb_saveman_get_precision';
0035 
0036 if isempty(saveman)
0037   error('(%s)saveman is a required parameter', func_);
0038 end
0039 
0040 % --- check field
0041 if ~isfield(saveman, 'precision')
0042   % set empty data
0043   saveman.precision = '';
0044 end
0045 return;
0046 %
0047 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0048 
0049 % --- END OF FILE --- %

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005