Home > vbmeg > functions > device > meg > vb_meginfo_set_data_bit_len.m

vb_meginfo_set_data_bit_len

PURPOSE ^

MEGinfo setter for data bit length

SYNOPSIS ^

function [meg_info] = vb_meginfo_set_data_bit_len(meg_info, bit_len)

DESCRIPTION ^

 MEGinfo setter for data bit length
 [usage]
   [meg_info] = vb_meginfo_set_data_bit_len(meg_info, bit_len)
 [input]
   meg_info : <required> <<struct>> MEG information
    bit_len : <optional> <<file>> data bit length []
            : e.g. 12 or 16
 [output]
   meg_info : updated MEG information struct
            :  the data is stored in 'acq_info' as 'data_bit_len' field
 [note]
   The new standard format was defined. (2011-05-26)
 [history]
   2007-06-12 (Sako) initial version
   2011-05-26 (Sako) modified according to the new data format

 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 [meg_info] = vb_meginfo_set_data_bit_len(meg_info, bit_len)
0002 % MEGinfo setter for data bit length
0003 % [usage]
0004 %   [meg_info] = vb_meginfo_set_data_bit_len(meg_info, bit_len)
0005 % [input]
0006 %   meg_info : <required> <<struct>> MEG information
0007 %    bit_len : <optional> <<file>> data bit length []
0008 %            : e.g. 12 or 16
0009 % [output]
0010 %   meg_info : updated MEG information struct
0011 %            :  the data is stored in 'acq_info' as 'data_bit_len' field
0012 % [note]
0013 %   The new standard format was defined. (2011-05-26)
0014 % [history]
0015 %   2007-06-12 (Sako) initial version
0016 %   2011-05-26 (Sako) modified according to the new data format
0017 %
0018 % Copyright (C) 2011, ATR All Rights Reserved.
0019 % License : New BSD License(see VBMEG_LICENSE.txt)
0020 
0021 % --- CHECK ARGUMENTS --- %
0022 if ~exist('meg_info', 'var'), meg_info = []; end
0023 if ~exist('bit_len', 'var'), bit_len = []; end
0024 [meg_info, bit_len] = inner_check_arguments(meg_info, bit_len);
0025 
0026 % --- MAIN PROCEDURE --------------------------------------------------------- %
0027 %
0028 meg_info.device_info.acq_info.data_bit_len = bit_len;
0029 return;
0030 %
0031 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0032 
0033 % --- INNER FUNCTIONS -------------------------------------------------------- %
0034 %
0035 % --- inner_check_arguments()
0036 %
0037 function [meg_info, bit_len] = inner_check_arguments(meg_info, bit_len)
0038 func_ = mfilename;
0039 
0040 if isempty(meg_info)
0041   error('(%s)meg_info is a required parameter', func_);
0042 end
0043 return;
0044 %
0045 % --- end of inner_check_arguments()
0046 %
0047 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0048 
0049 % --- END OF FILE --- %

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