function output_matrix = makemat(input_string,charac)
% Creates a matrix out of a character array with entries
% seperated by ASCII charac. If charac omitted then
% white spaces are assumed as the delimeters
% Example output_matrix = makemat(input_string,char(34))
% Forms a matrix out of a comma delimited charatcer vector		

if isempty(input_string);output_matrix = [];return;end

switch nargin
case 2
otherwise
    charac = char(32);
end

output_matrix = [];
R = 'X';
while ~isempty(R)
    [T,R] = strtok(input_string,charac);
    input_string = R;
    output_matrix = strvcat(output_matrix,T);
end