Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

decapitalise(input)
function input = decapitalise(input)
% DECAPITALISE makes the first letter of the string into lower-case
% output = decapitalise(input) works with mixed cell arrays, strings, and
% character arrays

% if its a character array
if ischar(input) && ~isempty(input)
    % makes the whole first column upper case
    input(:, 1) = lower(input(:, 1));

elseif iscell(input)
    % loops round for each recursively - allows non-flat cell arrays to be
    % capitalised
    input = cellfun(@capitalise, input, 'UniformOutput', false);
    
elseif isstruct(input)
    % does the same for structures
    input = structfun(@decapitalise, input, 'UniformOutput', false);
end

Contact us