⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alldata.m

📁 A MATLAB Simulation of Transient Otoacoustic Emission signals
💻 M
字号:
function [Mh, DampSp, stiff, undamp, Da, Dy, Dw, Vs, N, x, dT, QVbm, QVs, Prop] = alldata(dT)
% 
%   [Mh, DampSp, stiff, undamp,Da, Dy, Dw, Vs, N, x, dT, QVbm, QVs] = ALLDATA(dT)
%
% 	Function ALLDATA is called by the main routine COCHLEA.M in order to load 
%   all data needed for the time domain implementation of the human cochlea
%     
%   ALLDATA  loads data from:
%   BMOPS.MAT (data for basilar membrane dynamics, see BMOPS_OAE.M) 
%   TMOPS.MAT  (data for tectorial Membrane dynamics, see TMOPS_OAE.M)
%   HUMAN_OAE.MAT (lambda values for smooth and local damaged cochlear amplifier
%   gain, and BM-stapes coupling Green's function)
%   
%	 Mh =	Mexican hat matrix: inverse discrete-time kernel times dT
%	 DampSp = BM damping matrix accounting for absolute and shear viscosity
%	 stiff = BM stiffness vector
%	 undamp = undamping vector
%	 Da =	BM-acceleration coupling factor of TM (vector)
%	 Dy =	TM displacement factor vector times dT
%	 Dw =	TM velocity factor vector times dT
%	 Vs =	Stapes propagator vector times dT
%	 N  =	Number of points on the BM
%	 x  =	BM point vector (nonuniform, see GAUSSGRID.M)
%	 dT	= sampling-time interval (def. dT=5e-3, i.e. sampling frequency =200 kHz)
%
%     〤opyright by Renato Nobili, Padova University, Italy, 2003 - Not for commercial use.

if nargin <1
    dT=5e-3;
end

% -------------- Quantities in BMOPS.MAT (see BMOPS.M): ---------------------
Mh=[];
Vs=[];
x=[];
ShSp=[];
stiff=[];
dampn=[];
damp0=[];
N=[];
QVbm = [];
QVs = [];

if exist('BMOPS.MAT')==2,
	load BMOPS.MAT
else
   disp(' BMOPS.MAT does not exist. It will be created!');
   bmops(dT); 
   disp('	Now BMOPS.MAT does exist');
   load BMOPS.MAT
end

% -------------------- Quantities in TMOPS.MAT (see TMOPS.M): -----------------
Da =[];
Dy = [];
Dw =[];
gamma =[];
invMechGain =[];
 
if exist('TMOPS.MAT')==2,
	load TMOPS.MAT
else
    disp('	TMOPS.MAT does not exist. It will be created!');
    tmops(dT);    
    disp('	Now TMOPS.MAT does exist.');
    load TMOPS.MAT   
end

% -------------------- LOADING AMPLIFICATION FACTORS LAMBDA
% lambda = set of lambda values for smooth undamping (smooth cochlear amplifier gain)
% dam_lambda = set of lambda values for local damaged undamping  (non smooth cochlear amplifier gain)
lambda = [];
dam_lambda = [];
load LAMBDATA.MAT

lambda = invMechGain*lambda; % as lambda was computed with mechGain =1; (see TMOPS.M)
dam_lambda = invMechGain*dam_lambda;

% -----------        SPARSE MATRIX FOR DAMPING PARAMETERS WORKS FASTER -------------
DampSp=sparse(diag(dampn + stiff*dT)) + 25*ShSp; % the Laplacian-like matrix ShSp is sparse
%------------------------------------------------------------------------

% -----  UNDAMPING COEFFICIENTS ARE COLLECTED IN A TRIPLET ------
% ----- (to facilitate radio button calls, see RADIO BUTTON commands in COCHLEA.M)
%
undamp = zeros(500,3);    
undamp(:,1) =  zeros(500,1);  % ZERO UNDAMPING FOR THE PASSIVE COCHLEA 
undamp(:,2) = lambda.*damp0.*gamma; % REGULAR UNDAMPING FOR THE ACTIVE COCHLEA 
undamp(:,3) = dam_lambda.*damp0.*gamma; % DAMAGED UNDAMPING FOR THE ACTIVE COCHLEA 

% if undamping is slightly decreased OAEs estinguish earlier    
% undamp(:,2) = 0.98*undamp(:,2); 
% undamp(:,3) = 0.98*undamp(:,3); 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -