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

vb_meginfo_set_precision

PURPOSE ^

return precision of binary data

SYNOPSIS ^

function [meginfo] = vb_meginfo_set_precision(meginfo, prec)

DESCRIPTION ^

 return precision of binary data
 [usage]
   [meginfo] = vb_meginfo_set_precision(meginfo, prec)
 [input]
   meginfo : <required> <<struct>> MEG information
      prec : <optional> <<string>> precision ['']
           :  default value is empty string
 [output]
   meginfo : newly updated MEGinfo struct
 [note]
   precision is used by fread or fwrite
 [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 [meginfo] = vb_meginfo_set_precision(meginfo, prec)
0002 % return precision of binary data
0003 % [usage]
0004 %   [meginfo] = vb_meginfo_set_precision(meginfo, prec)
0005 % [input]
0006 %   meginfo : <required> <<struct>> MEG information
0007 %      prec : <optional> <<string>> precision ['']
0008 %           :  default value is empty string
0009 % [output]
0010 %   meginfo : newly updated MEGinfo struct
0011 % [note]
0012 %   precision is used by fread or fwrite
0013 % [history]
0014 %   2007-06-25 (Sako) initial version
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('meginfo', 'var') meginfo = []; end
0021 if ~exist('prec', 'var') prec = ''; end
0022 [meginfo, prec] = inner_check_arguments(meginfo, prec);
0023 
0024 % --- MAIN PROCEDURE --------------------------------------------------------- %
0025 %
0026 meginfo.saveman.precision = prec;
0027 %
0028 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0029 
0030 % --- INNER FUNCTIONS -------------------------------------------------------- %
0031 %
0032 % --- inner_check_arguments()
0033 %
0034 function [meginfo, prec] = inner_check_arguments(meginfo, prec)
0035 
0036 func_ = 'vb_meginfo_set_precision';
0037 
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 %%%

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