Home > p2plib > asknu.m

asknu

PURPOSE ^

little function to ask user for number, with default

SYNOPSIS ^

function o=asknu(s,i);

DESCRIPTION ^

 little function to ask user for number, with default

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005