function y =fun(x) x=-10:0.01:10; if (x>1.1) y=1.1; end if (x<-1.1) y=-1.1; end if (x<=1.1)&&(x>=-1.1) y=x; end x=-10:0.01:10; y=f(x); plot(x,y)