function m = Corti_mass(x)
%	Computes effective organ of Corti mass per BM length 
%	as a function of site array X.
%	
%				M = Corti_mass(X)
%
%	This function loads and interpolates BM-width data from BM_Width.MAT.
%	The unit dimension of M is Kg/BETA, where BETA = 33.5 mm.
%	The mass per unit length is given by [density of water] times
%	[BM width] times [organ of Corti mean thickness].
%	Lengths are expressed as fractions of BM length (1 BETA = 33.5 mm). 
%--------------------------------------------------------------------

BM_Width=0;

load BM_Width.mat -ascii		% loading BM-width data

b = cochlear_radius(BM_Width(:,1) , BM_Width(:,2),x)/2;     	% the effective width is 1/2 
						%  the geometric width
b=b(:)';

ho=0.04/33.5;	%  The BM thickness in BETA units is assumed constant

N=length(x);

rho=0.0376;	% = 1000/(29.85)^3, water density in Kg/BETA^3, as 1m =29.85 BETA


micron = 29.85e-6; % 1 micron in BETA
h0 = 40*micron;	   % 40 micron,  
		   % putative height of the organ of Corti at base
		   % (effective for shear viscosity) 

h = h0*exp(log(4)*x);	% effective organ of Corti height 
			% (grows 4 times from base to apex)

w0 = 50*micron;	  % 50 micron,  
		  % putative width of the organ of Corti at base
		  % (effective for shear viscosity) 


w = w0*exp(log(4)*x); % effective organ of Corti width
		      % (grows 4 times from base to apex)


w =sqrt(w.*b);	% geometrical mean between effective widths 

m=rho*(h.*b);	% vector  m  is a row

m = (m+[m(1),m(1:N-1)])/2;  % Local averaging 

% clg, plot(x,m), title(' Mass of the BM mass density (Kg/BETA)');
