How do I run a separate .exe file within a .m script?

2 vues (au cours des 30 derniers jours)
Thomas Gunther
Thomas Gunther le 1 Juin 2018
Commenté : Paolo le 1 Juin 2018
I have an executable program to pull bin data from different directories and convert the data into .csv files. How do I write the command to run this separate executable within my matlab program? I prefaced the name of the executable with ! character without the .exe extension, but when I ran the program in my Command Window, I received the message 'Not recognized as an internal command, operable program or batch file'. Program works fine as a standalone executable and resides in my home directory where matlab script resides. Can someone please provide some guidance? Thank you.
  1 commentaire
Paolo
Paolo le 1 Juin 2018
Have you tried using system ?
system('executable.exe')

Connectez-vous pour commenter.

Réponse acceptée

Thomas Gunther
Thomas Gunther le 1 Juin 2018
Thank you Paolo. I tried your solution and it works perfectly. I was not aware of the 'system' function to run an external batch or exe program. Thanks for the help!!

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler SDK dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by