How to retrieve outputs from an .m file into my GUI?
Show older comments
I'm building a GUI using guide in which I want to use a drop down menu to perform a series of procedures.
Those are as follows:
1 - Load a .txt file based on one of two possible choices;
2 - If the second option is selected, I have the gui retrieve four variables from a .txt file (dt, eEXP, wEXP and R);
3 - These variables are then used as inputs in an external function (blastLoadFun) which uses all four previously mentioned variables and has 2 outputs (Z and P);
4 - Finally, I want to keep these two outputs, for later use.
I've tried to accomplish this in the following ways:
-Assigning a random value to Z and P (ex. assignin('base','Z',0)), then trying to call the function: [Z,P] = blastLoadFun(eEXP, wEXP, R);
-Simply calling the function blastLoadFun(eEXP, wEXP, R)
Accepted Answer
More Answers (1)
Sulaymon Eshkabilov
on 8 Sep 2020
0 votes
One of the possible solutuons is to call/excute your pre-created function file, that loads your *.txt data into MATLAB (depicted in step 1) workspace, within the callback function used for your GUI.
1 Comment
Diogo Carvalho
on 8 Sep 2020
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!