Filter löschen
Filter löschen

How to initiate a linux (shell) command from matlab but not wait for the output?

5 Ansichten (letzte 30 Tage)
I know I can use the function unix (or system), but it has to wait the script to return. The script actually will run for a long time. I prefer matlab function to return immediately after calling the shell script. Is it possible?
Thanks a lot in advance!

Akzeptierte Antwort

Ken Atwell
Ken Atwell am 13 Jul. 2013
If you end the command line with an ampersand, system should return immediately
system('some-long-running-command &');
Of course, you won't be able to capture the output of the command.
  2 Kommentare
esmail
esmail am 17 Feb. 2015
Hi. My problem is that I'm running multiple files with & in the background and am using system('wait') for all of them to complete. However, system('wait') is not working. I'd appreciate your response.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by