Deal with Closed MATLAB Executable and Windows command line

3 visualizaciones (últimos 30 días)
michael
michael el 26 de Mzo. de 2024
Editada: Fangjun Jiang el 26 de Mzo. de 2024
I was provided a closed matlab code (exe) built by matlab application. When I ran it, I see that there are some UI with some input parameters and some output parameters. I'd like to send some inputs from windows command line and get the output.
I've tried to do so by
my_app_name input1 input2 ...
, but i'm getting an error like: The input to str2func "input1" is not valid funciton name.
I guess that the function which shall be called is func2 with those input parameters.
How can I do this?
  3 comentarios
michael
michael el 26 de Mzo. de 2024
Editada: michael el 26 de Mzo. de 2024
I wish I had. He refuses to do so
Mario Malic
Mario Malic el 26 de Mzo. de 2024
Editada: Mario Malic el 26 de Mzo. de 2024
Well, input1 and input2 should be existing functions. If you want to use the functions that are within the executable, then you should know their names.
I don't know much about what could you do, other than waste your time by trying to figure out what is inside the program.
This what I am going to write may not help, but try supplying this as an input, maybe it'll lead you somewhere.
eval("whos")

Iniciar sesión para comentar.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 26 de Mzo. de 2024
Editada: Fangjun Jiang el 26 de Mzo. de 2024
Based on the error message, it seems that "input1" is passed to the app when you run it in command line
my_app_name input1 input2 ...
which is really good. It indicates that the app is designed to run interactively as well as through API.
What happens if you run str2func('input1') in MATLAB Command Window? Did you provide a valid 'input1', such as
str2func('abs')
ans = function_handle with value:
@abs

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by