Reputation: 576
I have 2 scripts:
I need to run this two scripts in parallel (no output for both of them). I was thinknig to call to the python scirpt, from the matlab script.
I know it is possible to run python script from matlab like:
systemCommand='my_script.py'
system(systemCommand)
however in this way, the matlab script will wait to the return of the python script, and the rest of my matlab script will not be executed.
any ideas?
Upvotes: 2
Views: 738
Reputation: 65430
As mentioned near the end of MATLAB's system
documentation in the "Tips" section, to run a system command in the background (on *nix), you can append an ampersand(&
) to the end of your command to tell it to run in the background.
system('my_script.py &')
If you're on Windows, you'll want to use the following to prevent a command window from opening.
system('start /b my_script.py');
Upvotes: 1