function L=SolveDispersionEquation(h,T,L0)
%     L=SolveDispersionEquation(h,T,L0)
%     h--water depth
%     T--wave period
%     L--wave length
%     L0-initial wave length
    g=9.81; 
    error=0.00001;
    L=g*T*T*tanh(2*pi/L0*h)/2/pi;
while abs(L-L0)>error
        L0=L;
        L=g*T*T*tanh(2*pi/L0*h)/2/pi;
end
end