cobratoolbox
cobratoolbox copied to clipboard
Error in initCobraToolbox (line 358, 460)
Please include a short description of problem here I hereby confirm that I have:
- [ ] Tried to solve the issue on my own
- [X] Retried to run my code with the latest version of The COBRA Toolbox
- [ ] Checked that a similar issue has not already been opened (Note: You may replace [ ] with [X] to check the box)
Hi, I have used latest cobratoolbox( Master version) in Matlab 2017b . But, i had some error in 'initCobraToolbox' as blow.
=========================================
Checking available solvers and solver interfaces ...Undefined function 'contains' for input arguments of type 'cell'.
Error in changeCobraSolver (line 358)
if ~contains(solverType, OPT_PROB_TYPES
Error in initCobraToolbox (line 460) [solverOK,solverInstalled] = changeCobraSolver(supportedSolversNames{i},SOLVERS.
(supportedSolversNames{i}).type{1},0, 2);
=========================================
Any idea what might cause this error?
Could you run your code again setting "break on error" (under the "Run" button), and tell us the contents of the OPT_PROB_TYPES
, solverType
and solverName
variables?
In addition: What is the output of which contains
?
Sorry!! My matlab version is 2014b, "Run" button not found.
Is there any other way to check the contents (OPT_PROB_TYPES, solverType and solverName)?
Thanks!
The Toolbox relies on several functions introduced in Matlab 2016b, so it will not work on 2014b.
You can try to use an old version of the toolbox (e.g. 2.0 but that wont have newer functionalities and might contain bugs.
This includes the contains
function which is causing your problems.