function X = removeBlanks(X,iscat)
%removeBlanks Remove blanks from cellstr variables.

%   Copyright 2016 The MathWorks, Inc.

cols = find(iscat);
for j=1:length(cols)
    vi = X{:,cols(j)};
    if iscellstr(vi) && isvector(vi)
        if (numel(unique(strtrim(vi)))< numel(unique(vi)))
            X{:,cols(j)} = strtrim(vi);
        end
    end
end
end
