My dropdown list contains the ff. strings: Low Pass, High Pass, Band Pass, Stop Band. Whenever I choose the Low Pass, the error below shows. The code below works for the rest.
My goal is to make the edtCutoff2 and txtRange invisible when I choose Low Pass and High Pass but the code below works only for High Pass.
Error:
Error using ==
Matrix dimensions must agree.
Error in untitled>popFreqResp_Callback (line 168)
if ((str == 'Stop Band') | (str == 'Band Pass') == 1)
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in untitled (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in@(hObject,eventdata)untitled('popFreqResp_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
Code Snippet
function popFreqResp_Callback(hObject, eventdata, handles)
list=get(handles.popFreqResp,'String');
str=list{get(handles.popFreqResp,'Value')};
if ((str == 'Stop Band') | (str == 'Band Pass') == 1)
set(handles.edtCutoff2,'Visible','on');
set(handles.txtRange,'Visible','on');
else
set(handles.edtCutoff2,'Visible','off');
set(handles.txtRange,'Visible','off');
end