-2

I'm creating a Matlab code in windows 10, which in turns uses the Ubuntu environment (inside windows 10) to perform some calculations mixing Matlab and OpenFOAM. I summary, what I do is that I have a Matlab code, which at certain moment calls a shell script function inside my ubuntu environment and this function perform everything that I need on ubuntu. If I test that .sh file inside the ubuntu environment it works flawless, but when I call it from Matlab (on windows 10) it doesn't work. In Matlab my call is done like this: system('bash -c "******.sh"'); and I receive the following error /bin/bash: ******.sh: No such file or directory even if the file exists. Any clues?

1 Answers1

0

Sorry, I was out of the country, but yesterday I was able to solve the problem. The reason to use both software that way is that I need OpenFOAM to work in its native configuration. That said, it seems that my problem was due to the fact that windows allows you to install bash and Ubuntu at the same time, so when I asked to Matlab to perform a system('bash -c "******.sh"') it tried to use bash whilst I had everything installed on Ubuntu. So the solution was simply to delete bash of my Windows10 installation.