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

vb_meginfo_get_sample_number

PURPOSE ^

get number of sample from MEGinfo struct and return it

SYNOPSIS ^

function Nsample = vb_meginfo_get_sample_number(meginfo)

DESCRIPTION ^

 get number of sample from MEGinfo struct and return it
 [usage]
   Nsample = vb_meginfo_get_sample_number(meginfo)
 [input]
   meginfo : <required> <<struct>> MEG information
 [output]
   Nsample : number of sample
 [note]
   
 [history]
   2007-05-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 Nsample = vb_meginfo_get_sample_number(meginfo)
0002 % get number of sample from MEGinfo struct and return it
0003 % [usage]
0004 %   Nsample = vb_meginfo_get_sample_number(meginfo)
0005 % [input]
0006 %   meginfo : <required> <<struct>> MEG information
0007 % [output]
0008 %   Nsample : number of sample
0009 % [note]
0010 %
0011 % [history]
0012 %   2007-05-25 (Sako) initial version
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 % --- CHECK ARGUMENTS --- %
0018 if ~exist('meginfo', 'var') meginfo = []; end
0019 [meginfo] = inner_check_arguments(meginfo);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 Nsample = meginfo.Nsample;
0024 %
0025 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0026 
0027 % --- INNER FUNCTIONS -------------------------------------------------------- %
0028 %
0029 % --- inner_check_arguments()
0030 %
0031 function [meginfo] = inner_check_arguments(meginfo)
0032 func_ = 'vb_meginfo_get_sample_number';
0033 if isempty(meginfo)
0034   error('(%s)meginfo is a required parameter', func_);
0035 end
0036 
0037 if ~isfield(meginfo, 'Nsample')
0038   error('(%s)Nsample is a required field of MEGinfo', func_);
0039 end
0040 return;
0041 %
0042 % --- end of inner_check_arguments()
0043 
0044 %
0045 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0046 
0047 %%% END OF FILE %%%

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