Open Application with MATLAB

53 vues (au cours des 30 derniers jours)
Sebastian Caceres
Sebastian Caceres le 15 Fév 2021
Hello!
I'd like to use MATLAB to open 'Zebra Setup Utilities'(an application used to control Zebra label printers). My ultimate goal is use matlab to print labels from a printer, but I am struggling on step 1 which is to even open the application
I have tried using the !, system(' '), and winopen() commands which I have read are supposed to open up executable programs from the command line. However, for the first two I recieve this error
'Zebra' is not recognized as an internal or external command,
operable program or batch file.
and this error for winopen
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced
delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
Are these commands only meant to open up matlab files? Because they sucessfully open those! Are there any other ways I should try to open up the Zebra Setup Utilities?

Réponse acceptée

Mario Malic
Mario Malic le 15 Fév 2021
Modifié(e) : Mario Malic le 15 Fév 2021
Hi Sebastian,
you're supposed to provide full path to the executable file when using system command.
system("C:\Program Files\...\ Zebra.exe");
This might be a better way to do this as it provides more control over the process. You don't need to define Arguments and UseShellExecute properties in your case.
  1 commentaire
Sebastian Caceres
Sebastian Caceres le 15 Fév 2021
Hi Mario! Thanks it worked, and I will also be sure to check out the link you recommended!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Debugging and Analysis dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by