Hi all! I'm programming a GUI. I have a popup menu that enables to display differents signals depending on the option selected. In the callback function of popup menu I've write this code:
% Determine the selected data set.
str = get(source, 'String');val = get(source,'Value');% Set current data to the selected data set.
switch str{val}case 'Delta' % User selects Delta.
current_data = delta;case 'Theta' % User selects Theta.
current_data = theta;case 'Alpha' % User selects Alpha.
current_data = alpha;case 'Beta' % User selects Beta.
current_data = beta;case 'Gamma' % User selects Gamma.
current_data = gamma;end
Now I've to pass the option selected to a pushbutton's callback function that generates plot when pushed by users. How can I do this? It would very helpful for me to resolve this problem. Thanks in advance.
[EDITED, code formatted, Jan]
Best Answer