Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to use variable of another function with a function? switch-case. Matlab Gui

1 visualización (últimos 30 días)
I want to call a variable in a popupmenu from a button. I mean, popup value will only show the current status and when I press the button it will operate according to the popup menu status. Here is my code, i get "Undefined function or variable 'popupmenu4value" error when i press the button.
function pushbutton1_Callback(hObject, eventdata, handles)
switch popupmenu4value
case 'A'
%function of A
case 'B'
%function of B
function popupmenu4_Callback(hObject, eventdata, handles)
contents = get(handles.popupmenu4,'String');
popupmenu4value = contents{get(handles.popupmenu4,'Value')};
I found axesMenuToolbar in gui examples but it is written in older verison and i can't use it. what i want is exactly this "axesMenuToolbar" help gui. thanks in advance..

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by