I ended up solving this problem myself, where 'z' is defined as the arc of a semicircle and 'h' being the height with which the arc was to stop and level out with lines;
depth = min(z)+ h;
z(z>(depth)) = (depth);
plot(z)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!