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

vb_meginfo_set_sample_number

PURPOSE ^

<<setter>> number of sample of MEGinfo

SYNOPSIS ^

function [meginfo] = vb_meginfo_set_sample_number(meginfo, n_sample)

DESCRIPTION ^

 <<setter>> number of sample of MEGinfo
 [usage]
   [meginfo] = vb_meginfo_set_sample_number(info, n_sample)
 [input]
    meginfo : <required> <<struct>> MEGinfo
   n_sample : <optional> sample number [0]
 [output]
    meginfo : MEGinfo after updating
 [note]

 [history]
   2008-02-21 (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_sample_number(meginfo, n_sample)
0002 % <<setter>> number of sample of MEGinfo
0003 % [usage]
0004 %   [meginfo] = vb_meginfo_set_sample_number(info, n_sample)
0005 % [input]
0006 %    meginfo : <required> <<struct>> MEGinfo
0007 %   n_sample : <optional> sample number [0]
0008 % [output]
0009 %    meginfo : MEGinfo after updating
0010 % [note]
0011 %
0012 % [history]
0013 %   2008-02-21 (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('meginfo', 'var'), meginfo = []; end
0020 if ~exist('n_sample', 'var'), n_sample = []; end
0021 [meginfo, n_sample] = inner_check_arguments(meginfo, n_sample);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 meginfo.Nsample = n_sample;
0026 return;
0027 %
0028 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0029 
0030 % --- INNER FUNCTIONS -------------------------------------------------------- %
0031 %
0032 % --- inner_check_arguments()
0033 %
0034 function [meginfo, n_sample] = inner_check_arguments(meginfo, n_sample)
0035 func_ = mfilename;
0036 if isempty(meginfo)
0037   error('(%s)meginfo is a required parameter', func_);
0038 end
0039 
0040 if isempty(n_sample)
0041   n_sample = 0;
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