How to open .fig from GUI and display them?

9 views (last 30 days)
Hello everyone,
I'm new to AppDesigner, and I am trying to create an app plotting some antenna radiation patterns for various antennas.
I found out that the Antenna Toolbox is not really supported for compilation as a standalone app, so what I thought was to run the necessary codes in matab, save the figure files, and then simply according to user input in the GUI side of my app, to have a code that simply displays the already-made figure.
I have not been able to construct a code that is able to take a set matlab figure, and display it in a new window from GUI. Any ideas?
My idea is something like below, when a button is pushed, start cases based on the value of two numeric edit fields, and according to every value pair plot the corresponding .fig
I get that openfig won't directly plot it, I don't understand what to put after that so that it gets displayed in its own window.
Thank you in advance for your help.
function ex3button2ButtonPushed(app, event)
%close all
%figure;
var1=app.ex3field2.Value; %read value from first GUI input point
var2=app.ex3field2.Value; %read value from second GUI input point
switch var1 %run a bunch of cases like this, each one leading to a premade .fig
case '100'
switch var2
case '200'
openfig('3a_100_200.fig')
%openfig('3a_100_200.fig')
end
end
  1 Comment
Sahithi Kanumarlapudi
Sahithi Kanumarlapudi on 23 Oct 2020
Hi,
Could you provide the code which you were using to save the figures?

Sign in to comment.

Answers (0)

Categories

Find more on Interactive Control and Callbacks 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!