Failed to use system () and win 10 bash.exe in Matlab
I am trying to use new bash functionally from windows 10 to run a linux program through matlab.
In this particular case, it is a program called snaphu that processes the input file and generates the output file. On linux (or the new bash shell in win10), you start it like:
snaphu -f configfile inputfile
You can run this command directly in cmd with:
bash -c "snaphu -f configfile inputfile"
This process processes the file and generates an output file. I am using matlab to create an input file and I would like to run snaphu after creating this file with
system('bash -c "snaphu -f configfile inputfile"')
use matlab to process the output file it generates in a single worker thread. However, using this command, I am not getting my output file. However adding and working.
system('bash -c "snaphu -f configfile inputfile" &')
The problem with this approach is that I am using a for loop to process about 1000 of these input files, each different from the last iteration. If I use "&" every time a new window opens.
I don't understand why it generates an output file in the latter case, but not the first. Can anyone help me?
source to share
No one has answered this question yet
Check out similar questions: