availablePb

PURPOSE ^

% Function for checking if the function is available

SYNOPSIS ^

function [funOk,typePb]=availablePb(txt)

DESCRIPTION ^

% Function for checking if the function is available
 L. LAURENT --  04/05/2018 -- luc.laurent@lecnam.net

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Function for checking if the function is available
0002 % L. LAURENT --  04/05/2018 -- luc.laurent@lecnam.net
0003 
0004 % optiGTest - set of testing functions    A toolbox to easy manipulate functions.
0005 % Copyright (C) 2018  Luc LAURENT <luc.laurent@lecnam.net>
0006 %
0007 % This program is free software: you can redistribute it and/or modify
0008 % it under the terms of the GNU General Public License as published by
0009 % the Free Software Foundation, either version 3 of the License, or
0010 % (at your option) any later version.
0011 %
0012 % This program is distributed in the hope that it will be useful,
0013 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015 % GNU General Public License for more details.
0016 %
0017 % You should have received a copy of the GNU General Public License
0018 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
0019 
0020 function [funOk,typePb]=availablePb(txt)
0021 funOk=false;
0022 %extract name of functions
0023 strPbUn=loadDimUn();
0024 strPbCons=loadDimCons();
0025 strpbMulti=loadDimMulti();
0026 %
0027 listPbUn=fieldnames(strPbUn);
0028 listPbCons=fieldnames(strPbCons);
0029 listPbMulti=fieldnames(strpbMulti);
0030 %
0031 %check if function is available and which case of pb it is
0032 if any(ismember(listPbUn,txt))
0033     funOk=true;
0034     typePb='Un';
0035 end
0036 if any(ismember(listPbCons,txt))
0037     funOk=true;
0038     typePb='Cons';
0039 end
0040 if any(ismember(listPbMulti,txt))
0041     funOk=true;
0042     typePb='Multi';
0043 end
0044 end

Generated on Tue 28-May-2019 16:00:34 by m2html © 2005