how to callback a code graphic with a graphic of a matlab app

1 visualizzazione (ultimi 30 giorni)
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??

Risposta accettata

Dinesh
Dinesh il 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.

Più risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by