function [f] = my_piece_wise(x)
% Function to evaluate a piece-wise function
if (x < 1)
    f = x;
elseif ((x >= 1) && (x <= 3))
    f = -(x-1)^2 + 1;
else
    f = -3;
end
