How to create a parameter panel in matlab figure?

Hello, How can make a menu panel diplaying certain parameters in matlab figure. I have plotted an antenna radiation pattern and now I want to display certain parameters (both numerical and text) which I have calculated in that figure. I could use the title function of matlab but I want to create a small panel on left side of figure showing these parameters. Thank you.

Answers (1)

doc uipanel
contains an example.
doc uicontrol
gives more examples for the actual controls themselves.
Or if you want a more detailed GUI then you can use GUIDE to create one rather than adding a panel to a standard figure on the fly.

3 Comments

@Adam Actually I am already working on uipanel and uicontrol what I have done so far is created a panel and some control parameters now the problem I am facing is how to update those values or relate it to the created parameters. for e.g what I did is this
m=figure(some properties)
m.p=uipanel(some properties)
m.a=uicontrol('Parent',m.p,'Style','text','Position',[x y z])
set(m.a,'String','name',"variable where name is stored")
Now this thing make a panel and text box but its not getting the required value/string from the desired variable to display in that text box. I am not good in handles stuff so if possible please give me some other way around or if its necessary to do it with handles please tell me how can create and work with them. Thank you.
It is necessary to use handles for this.
pdata = get(m.p, 'Data');
a_value = pdata{1,2}; %extract a from the appropriate location in the panel
set(m.a, 'String', a_value);
What is "the desired variable"? to display in the text box?
Also your syntax is confusing...'m' is a handle to a figure, but you then try to set something in a field 'p' on it which should lead to a syntax error.

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Asked:

on 23 Aug 2016

Commented:

on 24 Aug 2016

Community Treasure Hunt

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

Start Hunting!