I've got Matlab2018b installed on a - 64 bits machine with Ubuntu 18.04 LTS.
I'm working on a 2D airfoil optimization throught Openfoam and I want to invoke the ubuntu terminal using the system function (or "dos" and "unix" function) from Matlab in order to give it multiple commands, either step by step or running a ./sh script, however when I try it with these functions an error appears, in fact, I do a similar thing but calling a python script from matlab (with either of those functions ex: "[status, cmdout] = system(python myScript.py)") which perform the same commands invoking the terminal, but the same error appears. It looks like the problem is the way how I'm using the matlab "system-unix-dos" functions or the functions itselfs when it calls the terminal, because when I call either the python script or execute the ./sh file directly from the terminal (locate in the same directory), the openfoam commands run perfectly, besides when I type in the matlab command window "!bash" it connects well but the user has to give the order manually to run the ./sh file in the command window, but that is not 100% automatic and is not wanted. Unfortunately I need to this from matlab because there I have all my openfoam files generator and airfoil mesh generator and other stuffs in order to do any airfoil or airfoils analysis automatically. Does anyone know how to fix this?
- sh 1: plot3dToFoam: not found or appears command no found
- sh:1: autoPatch: not found or appears command no found
- sh:1: topoSet: not found or appears command no found
- sh:1: createPatch: not found or appears command no found
- sh:1: simpleFoam: not found or appears command no found