Can I use one Matlab code to input into an input box of another Matlab code?
Show older comments
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?
Answers (2)
Walter Roberson
on 19 Nov 2013
0 votes
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
on 19 Nov 2013
0 votes
2 Comments
Walter Roberson
on 19 Nov 2013
Please click on "Comment on this Answer" instead of creating a new Answer.
Walter Roberson
on 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.
Categories
Find more on MuPAD in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!