Do not open shell when running system

Hi all,
I am running an optimization which uses an external program (Nastran) in its function evaluation.
I use the system() function to run nastran.
Everything runs fine but a windows shell pops up everytime, which is rather annoying since this is my only computer I can work on and the new window stops me from being able to type in my webbrowser (e.g. here) or any other place every 15seconds and I have to keep clicking the point where I was to continue..
Is there a way to make the shell run in the background so I can continue using my computer?
I've tried using the other ways I know to run external programs but ! and dos() basically have the same function as system() so that ofcourse doesn't help..

5 commentaires

jessupj
jessupj le 7 Mai 2020
have you tried '&' at the end of the system command? see doc for system()
i don't have accesst to a windows system with matlab at the moment, but it apparently works.
  • If command includes the ampersand character (&), then status is the exit status when command starts
ChrizzzlP
ChrizzzlP le 7 Mai 2020
I do use an & at the end (&& exit & to be exact so that the shell will close once Nastran is finished a few seconds later), but that doesn't stop the shell from popping up it only switches the control back to MATLAB while computations continue :(
ChrizzzlP
ChrizzzlP le 7 Mai 2020
I found a similar question and their solution was to use system('start /b ' whatever I had before' &') but the start \b does unfortunately also not work for me, a command shell still pops up and interupts my typing..
Michael Soskind
Michael Soskind le 7 Mai 2020
So there is /b for background, and /min for minimized. Maybe you would be interested in using /min instead
ChrizzzlP
ChrizzzlP le 8 Mai 2020
Unfortunately minimizing does not prevent the take-over and I still cannot continue typing normally

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Produits

Version

R2019a

Commenté :

le 8 Mai 2020

Community Treasure Hunt

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

Start Hunting!

Translated by