function [n, status] = nma_verify_valid_numeric(str, h, msg) %verfies input string represents a numerical value [n, status] = str2num(str); if not(status) uiwait(errordlg(sprintf('non - numeric value for %s',msg),... 'Bad Input', 'modal')); uicontrol(h); return end end