popupmenu give varibale and calculate in push button

2 次查看(过去 30 天)
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

回答(1 个)

Image Analyst
Image Analyst 2017-1-22
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.

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by