function gui_check_vector(edithandle,resetstr)
% check whether the the given edit field contains a row vector; warn and reset if not
if ~exist('resetstr','var')
    resetstr = ''; end

str = get(edithandle,'String');
if ~isempty(str) && ~isvector(str2num(str))
    errordlg2('This field must be of the form [number, number, number, ...]'); 
    set(edithandle,'String',resetstr);
end

goodshawn12
github-repos/MATLAB/goodshawn12-REST/REST-e34ce521fcb36e7813357a9720072dd111edf797/dependencies/BCILAB/code/gui/private/gui_check_vector.m
REST
github-repos/MATLAB/goodshawn12-REST
e34ce521fcb36e7813357a9720072dd111edf797