Hello everyone,
I am trying to use Cantera with Matlab. Cantera 3.1 seems not to be compatible with the Matlab interface, as mentioned on their website. I tried several solutions, but I am still stuck, and the website for v3.0 is no longer available:
https://cantera.org/install/index.html1. First, I tried using conda with the following command:
conda create --name ct-env --channel cantera cantera cantera-matlab However, after setting the ctpath.m, I encountered the following error:
>> gas = Solution('gri30.xml')
Invalid MEX-file 'C:\Users\*\.conda\envs\ct-env\share\cantera\matlab\toolbox\ctmethods.mexw64': The specified procedure could not be found.
The MEX file is present but seems to not be working.
2. I also tried cloning the Git repository, followed by scons build and installation. This gave me the Matlab experimental folder. I followed the README procedure and changed the ctRoot.m, but I encountered this error:
Error using loadlibrary Could not find file C:\Users\*\.conda\envs\ct-env2\include\cantera\clib\ctmatlab.h.
I see that an .msi installer is also available, and I will try this option last, but I would prefer to stick with conda if possible. If anyone knows how to make it work, I would really appreciate your help.
Lastly, I tried using the Python extension, and it works:
py.cantera.Solution('gri30.yaml')
However, I do not want to be dependent on Python, as I may need to compile my code using Simulink/Matlab Coder.
Have a nice day.