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

%-- lo SPL (40 dB)
% ----- left edge x, low edge y, width x, height y
%axh1=axes('position',[.1  .65  .8  .3]);
%axh2=axes('position',[.1  .35  .8  .3]);
%axh3=axes('position',[.1  .05  .8  .3]);

%-- hi SPL (80 dB)

%figure

cd ../actNL/

xoff=+35;

xL=linspace(0,35,1000);
hlen=1; % q3y=logspace(-49,-45,20); q3y(10)

[x,P,Q,rh,eh,data_ph] = tw_nonlin_4M3(286.5,7.8476e-48,10);
axh1=subplot(3,1,1);
%axh1=axes('position',[.05 .7 .85 .25]);
p1=plot(xoff-xL,eh(hlen,:),xoff-xL,rh(hlen,:),xoff-xL,-eh(hlen,:));
set(p1(3),'Color','b');
set(axh1,'XMinorGrid','on')
grid
text(xoff-10,1e-3,'\fontsize{14}4.6 kHz')
title('\fontsize{14}Traveling wave with envelope, high SPL')

%clear all
qx=5.4556e-26; hlen=1; %q2=logspace(-40,-20,20); qx=q2(15)
[x,P,Q,rh,eh,data_ph] = tw_nonlin_4M3(82,qx,10);
axh2=subplot(3,1,2);
%axh2=axes('position',[.05 .4 .85 .25]);
p2=plot(xoff-xL,eh(hlen,:),xoff-xL,rh(hlen,:),xoff-xL,-eh(hlen,:));
set(p2(3),'Color','b');
set(axh2,'XMinorGrid','on')
grid
text(xoff-10,1e-4,'\fontsize{14}1.3 kHz')

%clear all
qx=1e-09; hlen=1; % q0=logspace(-9,-5,9); qx=q0(1)
[x,P,Q,rh,eh,data_ph] = tw_nonlin_4M3(23.51,qx,10);
axh3=subplot(3,1,3);
%axh3=axes('position',[.05 .1 .85 .25]);
p3=plot(xoff-xL,eh(hlen,:),xoff-xL,rh(hlen,:),xoff-xL,-eh(hlen,:));
set(p3(3),'Color','b');
set(axh3,'XMinorGrid','on')
grid
xlabel('\fontsize{14}Distance from stapes, mm')
text(xoff-10,1e-4,'\fontsize{14}370 Hz')

cd ../mkfig/
