function value = s_is_alpha ( s ) %% S_IS_ALPHA returns TRUE if the string contains only alphabetic characters. % % Discussion: % % Here, alphabetic characters are 'A' through 'Z' and 'a' through 'z'. % % Modified: % % 02 May 2004 % % Author: % % John Burkardt % % Parameters: % % Input, string S, the string to be checked. % % Output, logical VALUE, is TRUE if the string contains only % alphabetic characters. % FALSE = 0; TRUE = 1; for i = 1 : length ( s ) if ( ~ch_is_alpha ( s(i) ) ) value = FALSE; return end end value = TRUE;