function y = triang(t) % Triangle Function y = (abs(t) <= 1) .* (1 - abs(t));