Can I use one Matlab code to input into an input box of another Matlab code?
Ältere Kommentare anzeigen
I was wondering if I could have Matlab code A input values into Matlab code B when code B asks for a input?
In other words, I want to have one Matlab code A to analyze other Matlab codes (B, C, ...) with predetermined values when codes (B, C, ...) request inputs. Is that possible?
Antworten (2)
Walter Roberson
am 19 Nov. 2013
0 Stimmen
If they are running completely separately you would need to use Java Robot.
If you have two GUI that are cooperating in the same MATLAB session, one GUI's code can manipulate the handles belonging to the other GUI.
Nameo0
am 19 Nov. 2013
0 Stimmen
2 Kommentare
Walter Roberson
am 19 Nov. 2013
Please click on "Comment on this Answer" instead of creating a new Answer.
Walter Roberson
am 19 Nov. 2013
Java Robot is fine for the case where MATLAB is used to start a new executable and control it.
For the case where you have cooperating MATLAB GUI, the kind of situation where you would have difficulty would be if the second routine was busy computing something and not paying attention to clicks, but you wanted to be able to control the first routine anyhow. But in the case where the second routine is waiting for interaction, then Yes, in the majority of cases the first routine could control it.
Kategorien
Mehr zu MuPAD finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!