function c2 = ch_cap ( c ) %% CH_CAP capitalizes a single character. % % Modified: % % 14 April 2005 % % Author: % % John Burkardt % % Parameters: % % Input, character C, the character to capitalize. % % Output, character C2, the capitalized character. % if ( 'a' <= c & c <= 'z' ) c2 = c + 'A' - 'a'; else c2 = c; end