Good day

Pleas advise for code error. First figure is OK. 2nd one is incorrect.

Whei statments z<100 and 100<=z<200 are not taken in to accounte?

`x=0:300;y=x;[xx,yy]=meshgrid(x,y);z=(xx+yy)/2;figuresurf(x,y,z)if z<100; k=z;elseif z>=100 & z<200; k=100;else k=z-100;endfiguresurf(x,y,k)`

## Best Answer