Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
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..

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by