Home > vbmeg > functions > common > utility > vb_include_valiable.m

vb_include_valiable

PURPOSE ^

SYNOPSIS ^

function [answer_b] = vb_include_valiable(check_file, value_name)

DESCRIPTION ^

 This function checks the specified file whether includes
 the value or not.
 Warn: cannot detect 'value_name' and 'check_file', 'answer_b'.

 [IN] check_file : full_path
      value_name : character string

 answer : true or false

 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:

SOURCE CODE ^

0001 function [answer_b] = vb_include_valiable(check_file, value_name)
0002 %
0003 % This function checks the specified file whether includes
0004 % the value or not.
0005 % Warn: cannot detect 'value_name' and 'check_file', 'answer_b'.
0006 %
0007 % [IN] check_file : full_path
0008 %      value_name : character string
0009 %
0010 % answer : true or false
0011 %
0012 % Copyright (C) 2011, ATR All Rights Reserved.
0013 % License : New BSD License(see VBMEG_LICENSE.txt)
0014 
0015 answer_b = false;
0016 if ~exist(check_file, 'file')
0017     return;
0018 end
0019 
0020 load(check_file);
0021 
0022 value_names = whos;
0023 result = strmatch(value_name, {value_names.name});
0024 
0025 if result
0026     answer_b = true;
0027 else
0028     answer_b = false;
0029 end

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