how to callback a code graphic with a graphic of a matlab app
1 view (last 30 days)
Show older comments
how to callback a code graphic with a graphic of a matlab app
Is there a way where I can just link the graphic of the code with the UIaxes of the matlab app??
0 Comments
Accepted Answer
Dinesh
on 11 Mar 2023
Hi Jose.
Firstly, I'm assuming that you have a separate MATLAB function saved as a ".m" file which generates the graphic that you want to display in the app.
Add the folder where this graphic code is stored to the path of the app.
addpath('<Folder_Path>');
Now, call the function in the app.
mygraphic = graphic_function(data); % data is the input
To link this graphic to the existing UIAxes, use "imshow".
imshow(mygraphic, 'Parent', app.UIAxes);
The parent of the graphic is the UIAxes in this case.
You can create a startupFcn from App designer and include all the above mentioned steps there if you would like to first load the graphic into the UIAxes every time the app is executed.
More Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer 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!