using the values in popup menu function in pushbutton_callback
Show older comments
Hi; I am doing GUI which has a popup menu that allow the user to choose from several options, lets say I have three options each one has different values for (I,V,P) current, voltage and power. my coding is like this (for example):
function popupmenu1_Callback(hObject, eventdata, handles)
switch get(handles.popupmenu,'Value')
case 1
I=7;
V=20;
p=130;
case 2
I=5;
V=30;
p=170;
otherwise
end
then I need to use these values in some calculation in pushbutton_callback, which it coding as below(for example):
function pushbutton1_Callback(hObject, eventdata, handles)
what code can I use to get these values from the popup menu ?? I need your help please.
Accepted Answer
More Answers (1)
Samer Husam
on 17 May 2012
0 votes
Categories
Find more on Symbolic Math Toolbox 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!