little function to ask user for number, with default
0001 % little function to ask user for number, with default 0002 function o=asknu(s,i); 0003 as=[s,'(default=',num2str(i),'):']; 0004 reply= str2num(input(as , 's')); 0005 if isempty(reply) reply=i; end 0006 if isnumeric(reply) o=reply; else o=i; end 0007 end