function newStrs = removeampersands(Strs)
% REMOVEAMPERSANDS Remove the ampersands (&) from the strings.
% 
% Inputs:
%   Strs - a string or cell array of strings.

%   Author(s): P. Pacheco and R. Losada 
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 2000/06/13 21:23:20 $ 

% Return early if input is empty
if isempty(Strs),
    newStrs = '';
    return
end

if iscell(Strs),
    for k = 1:length(Strs),
        newStr = removeIt(Strs{k});
        newStrs{k} = newStr;
    end
elseif ischar(Strs),
    newStrs = removeIt(Strs);
end
    
function newStr = removeIt(Str)
%REMOVEIT   Remove the ampersand from a string.
indx = findstr(Str,'&');
newStr = [Str(1:indx-1), Str(indx+1:end)];
