function output = bladedUnitConv(unit)
% bladedUnitConv adds icon
%   This is used to translate the signal unit

%   Project: IMPACT
%   Title of Code: bladedUnitConv
%   Relevant additional documentation:
%   Developer: Carlos Gonzalez
%   External Dependencies: NA
%
%   Disclaimer
%   CAUTION: It is strongly recommended that changes to this code
%   should be avoided without first consulting with authors.



convertion = {
    'F',     'N';...
    'L',     'm';...
    'A',     'rad';...
    'T',     's';...
    'M',     'kg';...
    'P',     'w';...
    'Q',     'VAr';...
    'V',     'V';...
    'I',     'A'};

for m = 1:numel(unit)-1
    if    strcmp(unit(m), unit(m+1))
        unit(m+1) = '2';
    end
end

output = unit;

for m = 1:size(convertion, 1)
    output = regexprep(output, convertion{m, 1}, convertion{m, 2});
end

