Check empty & not empty of text box in GUI
Afficher commentaires plus anciens
Notchop and Compop are the output textbox of GUI
op_n = str2double(get(handles.Notchop, 'String'));
op_c = str2double(get(handles.Compop, 'String'));
if ~empty(op_n)&& isempty(op_c) %op_n is not empty and op_c is empty
disp('H')
elseif isempty(op_n) && ~empty(op_c) %op_n is empty and op_c is not empty
disp('Gc')
elseif ~empty(op_n) && ~empty(op_c) %op_n is not empty and op_c is not empty
disp('H *Gc')
end
it showing error
Undefined function 'empty' for input arguments of type 'double'.
Error in GUI3_4>step_Callback (line 417)
if ~empty(op_n)&& isempty(op_c)
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in GUI3_4 (line 42)
gui_mainfcn(gui_State, varargin{:});
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Industrial Communication Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!