x=[-2:0.02:2]; y=1.1*sign(x).*(abs(x)>1.1)+x*(abs(x)<=1.1); plot(x,y)