Clear Filters
Clear Filters

popupmenu give varibale and calculate in push button

2 views (last 30 days)
i have 2 pop menu
i have popupmenu1, they are, "a,b,c,d,", how i give a=2345, b=3000, c=4000 and i make new variable "r", for the result what i chooosed before
and i have another popupmenu2, , popupmenu2 they are "x,y,z", i wanna continue the value before in to x, y, z then if i choose x=lastchoosed*11,17%
i do all of that in push button, how to make it
please help thanks

Answers (1)

Image Analyst
Image Analyst on 22 Jan 2017
Try this:
selectedIndex = handles.popupmenu1.Value
switch selectedIndex
case 1
a=2345
case 2
b=3000
case 3
c=4000
otherwise
d = 0
end
The explanation of this does not make any sense to me:
" i have another popupmenu2, , popupmenu2 they are "x,y,z", i wanna continue the value before in to x, y, z then if i choose x=lastchoosed*11,17%"
Try to reword it.

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!