how to callback a code graphic with a graphic of a matlab app
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jose Hidalgo
am 11 Mär. 2023
Kommentiert: Jose Hidalgo
am 4 Mai 2023
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 Kommentare
Akzeptierte Antwort
Dinesh
am 11 Mär. 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!