Is there a way to use a compiled MATLAB program (with MCR) in command line mode?

5 visualizzazioni (ultimi 30 giorni)
I want to code a software with a core and a user interface. The use should be able to run the core as it is from a sort of virtual command line or by using the user interface. Is there a way to achieve this? I'm asking because I noticed that users cannot "interact" a lot with compiler MATLAB code, for instance only *.mat files can be loaded into a compiled program and a few other things.

Risposte (1)

Walter Roberson
Walter Roberson il 30 Mag 2016
Yes, compile it as a Console Application and do not use any graphics. You can use input() to get user input.
  2 Commenti
Nicholas
Nicholas il 30 Mag 2016
Thank you very much for your reply. However, I've already known that I could do that. What I would like to achieve is that the user can call some functions for running the code. For instance, the user can type run(a,b,c) to run some function or run2(a,b) to run something else. input() is something pre-located in the compiled version. I would like that my compiled functions should be called randomly by the users. Is that possible?
Walter Roberson
Walter Roberson il 31 Mag 2016
That is, all command line arguments will be converted into string arguments to the function you indicated should be compiled. That function will need to recognize that strings have been passed and do appropriate operations (including possibly converting some to numeric values.)

Accedi per commentare.

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by