Deal with Closed MATLAB Executable and Windows command line

3 vues (au cours des 30 derniers jours)
michael
michael le 26 Mar 2024
Modifié(e) : Fangjun Jiang le 26 Mar 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 commentaires
michael
michael le 26 Mar 2024
Modifié(e) : michael le 26 Mar 2024
I wish I had. He refuses to do so
Mario Malic
Mario Malic le 26 Mar 2024
Modifié(e) : Mario Malic le 26 Mar 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")

Connectez-vous pour commenter.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 26 Mar 2024
Modifié(e) : Fangjun Jiang le 26 Mar 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

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits


Version

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by