pop up activation with push button

2 Ansichten (letzte 30 Tage)
Statisticka Obrada
Statisticka Obrada am 26 Sep. 2020
Kommentiert: Walter Roberson am 26 Sep. 2020
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 Kommentar
Walter Roberson
Walter Roberson am 26 Sep. 2020
I recommend using the debugger to trace the execution.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by