% set_numeric.m

function set_numeric(obj)

oldval = get(obj,'Value');

newval = str2num(get(obj,'String'));

if isempty(newval), newval = oldval; end

set(obj,'String',num2str(newval),'Value',newval)
