function [ ch, seed ] = ch_uniform ( clo, chi, seed ) %% CH_UNIFORM returns a random character in a given range. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 04 May 2005 % % Author: % % John Burkardt % % Parameters: % % Input, character CLO, CHI, the minimum and maximum acceptable characters. % % Input, integer SEED, a seed for the random number generator. % % Output, character CH_UNIFORM, the randomly chosen character. % % Output, integer SEED, a seed for the random number generator. % [ t, seed ] = r8_uniform_01 ( seed ); ch = floor ( clo + t * ( chi + 1 - clo ) ); ch = max ( ch, clo ); ch = min ( ch, chi ); return end