pop up activation with push button

Hi guys, please help!
I have created two pop up menus (in GUI over guide), and I want to create plot (filter type) based on the user selection. This plot should be created by push button.
I have made following code (bellow), but it doesn't work, even though there are no errors reported.
function prikazfitra_Callback(hObject, eventdata, handles)
u = get(handles.filterMenu,'value'); %get currently selected option from menu
v = get(handles.vrstafiltMenu,'value'); %get currently selected option from menu
if u == 2 && v == 1
d=str2double(get(handles.d,'string'));
r=str2double(get(handles.r,'string'));
Wn=2*d/handles.fs;
b=fir1(r,Wn);
% plot frekvencijskog odziva filtra
axes(handles.grafik2);
plot(b,1:length(b)); grid;
freqz(b,1);
elseif u == 2 && v == 2
%stuff here
elseif u == 2 && v == 3
%stuff here
elseif u == 2 && v == 4
%stuff here
elseif u == 3 && v == 1
%stuff here
elseif u == 3 && v == 2
%stuff here
elseif u == 3 && v == 3
%stuff here
elseif u == 3 && v == 4
%stuff here
end
not all elseif are shown. u and v are selections from pop up menu. d and r are edit with number value.
Thanks!

1 comentario

Walter Roberson
Walter Roberson el 26 de Sept. de 2020
I recommend using the debugger to trace the execution.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Sept. de 2020

Comentada:

el 26 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by