pop up activation with push button

2 vues (au cours des 30 derniers jours)
Statisticka Obrada
Statisticka Obrada le 26 Sep 2020
Commenté : Walter Roberson le 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 commentaire
Walter Roberson
Walter Roberson le 26 Sep 2020
I recommend using the debugger to trace the execution.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by