Home > functions > device > vb_info_get_sample_number.m

vb_info_get_sample_number

PURPOSE ^

return Nsample field from MEGinfo or EEGinfo

SYNOPSIS ^

function n_sample = vb_info_get_sample_number(info)

DESCRIPTION ^

 return Nsample field from MEGinfo or EEGinfo
 [usage]
   n_sample = vb_info_get_sample_number(info)
 [input]
   info : <required> MEGinfo or EEGinfo
 [output]
   n_sample : number of sample (.Nsample field)
 [note]
   Nsample field is one of the required fields
 [history]
   2009-07-28 (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  n_sample = vb_info_get_sample_number(info)
0002 % return Nsample field from MEGinfo or EEGinfo
0003 % [usage]
0004 %   n_sample = vb_info_get_sample_number(info)
0005 % [input]
0006 %   info : <required> MEGinfo or EEGinfo
0007 % [output]
0008 %   n_sample : number of sample (.Nsample field)
0009 % [note]
0010 %   Nsample field is one of the required fields
0011 % [history]
0012 %   2009-07-28 (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('info', 'var'), info = []; end
0019 [info] = inner_check_arguments(info);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 n_sample = info.Nsample;
0024 return;
0025 %
0026 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0027 
0028 
0029 % --- INNER FUNCTIONS -------------------------------------------------------- %
0030 %
0031 % --- inner_check_arguments()
0032 %
0033 function [info] = inner_check_arguments(info)
0034 func_ = mfilename;
0035 if isempty(info)
0036   error('(%s) info is a required parameter', func_);
0037 end
0038 return;
0039 %
0040 % --- end of inner_check_arguments()
0041 %
0042 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0043 
0044 %%% END OF FILE %%%

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