%
%   data from Zwislocki 1965 to generate figure 5-13 of the book
%   values taken from Dallos' book (matched by eye)
%
StSv = [
    0    0.05;
    0.1  0.058;
    0.12 0.068;
    0.11 0.078;
    0.24 0.088;
    0.25 0.049;
    0.4  0.04;
    0.4  0.039;
    0.38 0.033;
    0.45 0.035;
    0.45 0.03;
    0.5  0.03;
    0.48 0.028;
    0.52 0.029;
    0.52 0.026;
    0.84 0.026;
    0.84 0.024;
    0.84 0.022;
    1.0  0.023;
    1.2  0.024;
    1.2  0.027;
    1.5  0.026;
    1.6  0.022;
    1.6  0.021;
    1.6  0.02;
    2.0  0.015;
    2.2  0.026;
    2.18 0.018;
    2.22 0.0185;
    2.5  0.0165;
    2.9 0.012;
    2.9  0.015;
    2.9  0.016;
    3.0  0.014;
    3.2  0.008;
    3.5  0.008;
    3.5  0.01;
    ];
figure(1)
clf
semilogy(StSv(:,1), StSv(:,2), 'ko','markersize',8,'markerfacecolor','k');
axis([0 4 0.005 0.15]);
hold on
ylabel('S_t + S_v in cm^2', 'fontsize', 13, 'fontweight','bold');
xlabel('Distance from oval window (cm)','fontsize',13,'fontweight','bold');
x = [0 3.6];
y = 0.05*exp(-0.5.*x);
plot(x,y,'r-','linewidth',2);
s=sprintf('S_t+S_v = 0.05 * exp(-0.5x)');
text(0.5, 0.01, s, 'fontsize',11, 'fontweight','bold');

Rv = [
    0.25 7*10^(-10);
    0.6  1.02*10^(-9);
    1.0  2.3*10^(-9);
    1.6  4.5*10^(-9);
    2.2  1.0*10^(-8);
    2.65 1.8*10^(-8);
    3.0  2.8*10^(-8);
    3.25 4.3*10^(-8);
    3.4  6*10^(-8);
    ]

print -djpeg fig5-13a
    
figure(2)
clf
semilogy(Rv(:,1), Rv(:,2), 'ko','markersize',8,'markerfacecolor','k');
axis([0 4 10^(-10) 10^(-7)]);
hold on
ylabel('R_v cochlear compliance (cm^4/dyne)', 'fontsize', 13, 'fontweight','bold');
xlabel('Distance from oval window (cm)','fontsize',13,'fontweight','bold');

y2 = 4*10^(-10)*exp(1.5*x);
plot(x,y2,'r-','linewidth',2);
s=sprintf('R_v = 4*10^{(-10)} * exp(1.5x)');
text(0.5, 2*10^(-10), s, 'fontsize',11, 'fontweight','bold');

print -djpeg fig5-13b
