%#codegen
function y = fi_signed(a)
coder.inline('always');
if isfi(a) && ~(issigned(a))
    nt = numerictype(a);
    new_nt = numerictype(1, nt.WordLength + 1, nt.FractionLength);
    y = fi(a, new_nt, fimath(a));
else
    y = a;
end
end