function truefalse = ch_is_digit ( c ) % CH_IS_DIGIT returns TRUE (1) if the character C is a digit. % % Modified: % % 14 June 2003 % % Author: % % John Burkardt % % Parameters: % % Input, character C, a character. % % Output, integer TRUEFALSE, is 1 if C is a digit, 0 otherwise. % if ( '0' <= c & c <= '9' ) truefalse = 1; else truefalse = 0; end