t=0:.01:3;%the start and stop of t defines t0 and tf
t1 = 1;
t2 = 1.5;
z=funz(t,t1,t2);
plot(t,z);
function z = funz(t,t1,t2)
z=zeros(size(t));
z(t>t1&t<t2)=(t(t>t1&t<t2)-t1)*t1/(t2-t1);
z(t>=t2)=t1;
end

Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!