Home > vbmeg > functions > device > vb_msrmnt_active_trial_is_valid.m

vb_msrmnt_active_trial_is_valid

PURPOSE ^

check whether active trial field is valid or not from measurement file

SYNOPSIS ^

function [result] = vb_msrmnt_active_trial_is_valid(msrmnt_file)

DESCRIPTION ^

 check whether active trial field is valid or not from measurement file
 [usage]
   [result] = vb_msrmnt_active_trial_is_valid(msrmnt_file)
 [input]
   msrmnt_file : <required> <<file>> MEG-MAT file or EEG-MAT file
 [output]
        result : <<boolean>>
               :   true) valid
               :  false) invalid
 [note]
   @see vb_load_measurement_info.m
   @see vb_info_active_trial_is_valid.m
 [history]
   2008-06-04 (Sako) initial version
   2009-09-01 (Sako) substituted vb_load_measurement_info for vb_load_meg_info

 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 [result] = vb_msrmnt_active_trial_is_valid(msrmnt_file)
0002 % check whether active trial field is valid or not from measurement file
0003 % [usage]
0004 %   [result] = vb_msrmnt_active_trial_is_valid(msrmnt_file)
0005 % [input]
0006 %   msrmnt_file : <required> <<file>> MEG-MAT file or EEG-MAT file
0007 % [output]
0008 %        result : <<boolean>>
0009 %               :   true) valid
0010 %               :  false) invalid
0011 % [note]
0012 %   @see vb_load_measurement_info.m
0013 %   @see vb_info_active_trial_is_valid.m
0014 % [history]
0015 %   2008-06-04 (Sako) initial version
0016 %   2009-09-01 (Sako) substituted vb_load_measurement_info for vb_load_meg_info
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('msrmnt_file', 'var'), msrmnt_file = ''; end
0023 [msrmnt_file] = inner_check_arguments(msrmnt_file);
0024 
0025 % --- MAIN PROCEDURE --------------------------------------------------------- %
0026 %
0027 info = vb_load_measurement_info(msrmnt_file);
0028 result = vb_info_active_trial_is_valid(info);
0029 return;
0030 %
0031 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0032 
0033 % --- INNER FUNCTIONS -------------------------------------------------------- %
0034 %
0035 % --- inner_check_arguments()
0036 %
0037 function [msrmnt_file] = inner_check_arguments(msrmnt_file)
0038 func_ = mfilename;
0039 if isempty(msrmnt_file)
0040   error('(%s)msrmnt_file is a required parameter', func_);
0041 end
0042 
0043 if exist(msrmnt_file, 'file') ~= 2
0044   error('(%s)cannot find msrmnt_file : %s', func_, msrmnt_file);
0045 end
0046 return;
0047 %
0048 % --- end of inner_check_arguments()
0049 %
0050 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0051 
0052 %%% END OF FILE %%%

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