pop up activation with push button

조회 수: 2 (최근 30일)
Statisticka Obrada
Statisticka Obrada 2020년 9월 26일
댓글: Walter Roberson 2020년 9월 26일
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
Walter Roberson
Walter Roberson 2020년 9월 26일
I recommend using the debugger to trace the execution.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by