% generate bathy
xi = [0:10:1200];
% start with plane beach (dano's parameters (thesis))
Ab = 1.0;
x_b = 150;
Rb = 100;
Lb = 200;
phib =-pi/4;
z_r = 6;
x_r = 0;
b = 0.323;
A = 1.4;

z1 = z_r-A*(max(xi)-xi-x_r).^b;
z2 = z1-Ab*exp(-((max(xi)-xi-x_b)/Rb).^2).*cos(2*pi*(max(xi)-xi-x_b)/Lb -phib);

figure(1)
plot(max(xi)-xi-25,z2)
hold
plot([-100 1200],[0 0],'--')
hold
axis([0 600 -6 1])