% Emacs mode header: -*-Octave-*- source. %

omega=23.51; %11.1, 20, 23.51, 82, 286,
[x,zres,ih,rh,ah] = tw_lin_M(omega);
%tw_nonlin_4
yy=abs(rh);
F_int_convex_M
F_lambda_M
recc=1000./(3.5*omega.*lambda(:));  %(1:8) -> (:)
latcum=cumtrapz(-x(ilist(:)),recc);
NL_1 = length(ilist)-1;
hold on
grid on
%plot(-x,sqrt(rh.*rh+ih.*ih)/40,'g')
plot(-x,ah/800,'g') %20: /40, 23.. / 800
plot(-x,rh/800,'b') %20: /40, 23.. / 800
plot(-x(ilist(1:NL_1)),3.5*omega.*lambda(1:NL_1)/50,'r') %(1:8) -> (:)
plot(-x(ilist(1:NL_1)),3.5*omega.*lambda(1:NL_1)/50,'r+')
%plot(-x(ilist(:)),recc,'m')   %(1:8) -> (:), etc
%plot(-x(ilist(:)),recc,'mo')
plot(-x(ilist),zeros(NL,1),'ko') %y-axis was "list"
plot(-x(ilist(:)),latcum,'k')
plot(-x(ilist),latcum,'kx')
%title(' Numerical calculation of latency and velocity')
