How to choose option using radio buttons?

조회 수: 2 (최근 30일)
Alicja Krawczynska
Alicja Krawczynska 2017년 1월 19일
댓글: Alicja Krawczynska 2017년 1월 20일
Hello, I'm Matlab newbie in the middle of creating my school project. I'd like to create little app in GUI to help creating card deck for World of Warcraft. I want to be able to choose one of two sides of conflict and then choose one of champion classes (both using radio buttons). But I have no idea how to make my program understand all the choices to make. It should go like that: Step1: Choose your side. Step2: Choose your class. Program should remember it and use it later to customize deck. Help!

채택된 답변

Jorge Mario Guerra González
Jorge Mario Guerra González 2017년 1월 20일
You mean you want to get an outcome from the radiobutton clicking?
Radiobutton 1 Callback
function radiobutton1_Callback(hObject, eventdata, handles)
set(handles.radiobutton2,'Value',0);
disp(1);
guidata(hObject, handles);
Radiobutton2 Callback
function radiobutton2_Callback(hObject, eventdata, handles)
set(handles.radiobutton1,'Value',0);
disp(2);
guidata(hObject, handles);
When you choose either option shows the respective number at the workspace.
%
  댓글 수: 1
Alicja Krawczynska
Alicja Krawczynska 2017년 1월 20일
Thank you! I want it to write specific data to Excel when I choose one of the buttons (I have problem with that too, but I hope it will be easier now).

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

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by