Add radio buttons in figure

조회 수: 2 (최근 30일)
nitin thokare
nitin thokare 2011년 5월 24일
I'm new to user interfacing in matlab. I want to display 3 radio buttons along with figure (or each of subplots) which will allow me to select one of them. And i want to return the selected button number when i close figure.
How can I do this.?
please help as soon as possible.
Thanks in advance for any help.

답변 (2개)

Arnaud Miege
Arnaud Miege 2011년 5월 24일

You probably need to create a user interface using guide. See Creating Graphical User Interfaces in the MATLAB documentation.

HTH,

Arnaud

  댓글 수: 2
nitin thokare
nitin thokare 2011년 5월 24일
Ya. that's right. But as it's urgent for me, I can not go throught all those GUI stuff and know how it works just for 1 thing that i need.
So please give me in short a sample code that will allow me to display a figure along with 3 radio buttons (say with labels 'Opt1','Opt2','Opt3') on it. If i select any one of them (or change from default selection), this choice should be stored in one variable that i can use for some another computations.. depending upon choice.
Thanks.
Arnaud Miege
Arnaud Miege 2011년 5월 24일
I'm afraid there isn't a quick solution, you really need to spend time to learn this stuff.

댓글을 달려면 로그인하십시오.


Sean de Wolski
Sean de Wolski 2011년 5월 24일
Or you could look for code on the FEX that does it already and then use the relevant portions. A hint: my IMCENSOR function uses four exclusive radio buttons.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by