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

commandlinuxMATLABreturnscriptshellsystemunix

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!

Best Answer

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.