Using GUIDE, I'm making a periodic table and I'm not sure how can I make a for so that my radiobutton presses each button to read the info its inside.

1 view (last 30 days)
function pushbutton1_Callback(hObject, eventdata, handles) set(handles.textelem, 'string', 'H'); set(handles.textnum, 'string', '1'); matm=1.007997; ratm=53D-10; ptofus=14.025; putoebu=23; struct=HCP;
I have a pushbutton that just shows the element and the number and adds its atomic info but doesn't print it anywhere.
function radioHCP_Callback(hObject, eventdata, handles) for (i=1:1:107) pushbutton'i' if (struct==HCP) set(pushbutton'i', 'enable', 'on'); else set(pushbutton'i', 'enable', 'off'); end end
Basically what I want is that whenever you press this button it pushes every pushbutton (I have 107), and reads everything that's iniside them, including the variable struct (HCP, BCC, FCC, etc.), and only show the pushbuttons that have a HCP structure (I know that's not how you write it down, that's my question).
I surely hope you guys can help me out, thanks in advance.

Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!