function r = isnum(a) if ( isnumeric(a) ) r = 1; else o = str2double(a); r = !isnan(o); endif endfunction