running an executable in "MS-Windows command window" from MATLAB

2 vues (au cours des 30 derniers jours)
Sinan
Sinan le 21 Oct 2012
Is there a way to run an external executable code (e.g. an old Fortran code) in a "MS-Windows command window" from Matlab.
I've tried using
> system('old_executable')
This works but the output of the executable goes the Matlab Command Window, rather than the MS-Windows command window. Moreover, the Matlab Command Window becomes occupied and can't be used for other work...

Réponse acceptée

Jan
Jan le 21 Oct 2012
system('old_executable &')
  3 commentaires
Jan
Jan le 22 Oct 2012
@Walter: The above command opens a Windows command window, which contains all output of the called function. Example:
system('dir &')
This opens a command shell and displays the contents of the current directory there - and not in Matlab's command window. Afterwards the shell window is kept open. Therefore I think this matchs the OP's needs.
Sinan
Sinan le 22 Oct 2012
system('old_executable &')
does exactly what I was looking for.
Thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by