Effacer les filtres
Effacer les filtres

How can I launch an external program from a MATLAB compiled standalone application?

3 vues (au cours des 30 derniers jours)
Austin
Austin le 7 Oct 2013
Commenté : Kaustubha Govind le 16 Juin 2014
Trying to launch a separate executable from a program I have compiled using the Deployment Tool.
When launching the program from the MATLAB editor, I use the system command: system('start filename.exe') And the program launches fine, but once deployed as an executable, MATLAB can't find the file.
I've tried using "pwd" to find the path and creating a string with the full file path and name and then launching, but this doesn't work either.
Any ideas?
  1 commentaire
Kaustubha Govind
Kaustubha Govind le 16 Juin 2014
Are you testing the deployed executable on the same machine that it was compiled on? The SYSTEM command simply passes on the string to the system shell, so as long as the application is on the system PATH variable, the OS/shell should be able to find it. (In other words, it's not MATLAB that needs to find the executable, but the OS)

Connectez-vous pour commenter.

Réponses (1)

Vignesh Rangaishenvi
Vignesh Rangaishenvi le 16 Juin 2014
You can use the bang operator to launch stand-alone applications from MATLAB. For example, if you wish to launch “abc.exe” from MATLAB, you could use:
!abc.exe

Catégories

En savoir plus sur Application Deployment 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