how to callback a code graphic with a graphic of a matlab app
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Dinesh
2023-3-11
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!