Home > functions > device > meg > yokogawa > vb_calibinfo_get_data_bit_len.m

vb_calibinfo_get_data_bit_len

PURPOSE ^

return length of data bit from calib_info

SYNOPSIS ^

function [len] = vb_calibinfo_get_data_bit_len(calib_info)

DESCRIPTION ^

 return length of data bit from calib_info

 [usage]
   [len] = vb_calibinfo_get_data_bit_len(calib_info)

 [input]
   calib_info : <required> <<struct>> calibration information
              :  temporary struct for pre-process
              :   (new format 2011)
              :   .sensitivity <<struct array>> [1 x n_ch]
              :     .offset
              :     .gain
              :   .fll <struct array>> [1 x n_fll]
              :     .gain
              :   .ad
              :     .bit
              :     .analog_range
              :
              :   .sensor_label {n_ch x 1}

 [output]
          len : length of data bit (normally 16)

 [note]
 
 [history]
   2011-07-20 (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 [len] = vb_calibinfo_get_data_bit_len(calib_info)
0002 % return length of data bit from calib_info
0003 %
0004 % [usage]
0005 %   [len] = vb_calibinfo_get_data_bit_len(calib_info)
0006 %
0007 % [input]
0008 %   calib_info : <required> <<struct>> calibration information
0009 %              :  temporary struct for pre-process
0010 %              :   (new format 2011)
0011 %              :   .sensitivity <<struct array>> [1 x n_ch]
0012 %              :     .offset
0013 %              :     .gain
0014 %              :   .fll <struct array>> [1 x n_fll]
0015 %              :     .gain
0016 %              :   .ad
0017 %              :     .bit
0018 %              :     .analog_range
0019 %              :
0020 %              :   .sensor_label {n_ch x 1}
0021 %
0022 % [output]
0023 %          len : length of data bit (normally 16)
0024 %
0025 % [note]
0026 %
0027 % [history]
0028 %   2011-07-20 (Sako) initial version
0029 %
0030 % Copyright (C) 2011, ATR All Rights Reserved.
0031 % License : New BSD License(see VBMEG_LICENSE.txt)
0032 
0033 % --- CHECK ARGUMENTS --- %
0034 if ~exist('calib_info', 'var'), calib_info = []; end
0035 [calib_info] = inner_check_arguments(calib_info);
0036 
0037 
0038 % --- MAIN PROCEDURE --------------------------------------------------------- %
0039 %
0040 len = calib_info.ad.bit;
0041 return;
0042 %
0043 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0044 
0045 
0046 % --- INNER FUNCTIONS -------------------------------------------------------- %
0047 %
0048 % --- inner_check_arguments()
0049 %
0050 function [calib_info] = inner_check_arguments(calib_info)
0051 func_ = mfilename;
0052 if isempty(calib_info)
0053   error('(%s) calib_info is a required parameter', func_);
0054 end
0055 
0056 if ~isfield(calib_info, 'ad')
0057   error('(%s) ad (analog/digital) is a required field', func_);
0058 end
0059 
0060 if ~isfield(calib_info.ad, 'bit')
0061   error('(%s) ad.bit is a required field', func_);
0062 end
0063 return;
0064 %
0065 % --- end of inner_check_arguments()
0066 %
0067 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0068 
0069 % --- END OF FILE --- %

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