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

📄 otospe.m

📁 A MATLAB tool for analysis of Transient Otoacoustic Emission signals
💻 M
字号:
function [Sr, Sn, Ss, f] = otospe(r, s, fs)

%	[Sr, Sn, Ss, f] = otospe(r, s, fs)
%
%	otospe	calculates the spectra of cochlear responses Sr, averaging
%		noise Sn and stimulus Ss.
%
%   in:	r	cochlear responses [r1 r2]
%	s	stimulus
%	fs	sampling frequency (defult 25000)
%
%  out:	Sr	response spectrum
%	Sn	noise spectrum
%	Ss	stimulus spectrum
%	f	corresponding frequency range
%
% note:	otospe tries to emulate the ILO-program!

% (c) Heimo Ihalainen, Esa Ojala, Harri Nystedt 23.8.1990

if nargin<3; fs = 25000; end

[Rs1,f] = frz(r(:,1)); Rs2 = frz(r(:,2)); S = frz(s,1,257); f = f*fs;

Sr = 2*real(Rs1.*conj(Rs2))/(20e-6*512)^2;
%Sr = 2*abs((Rs1+Rs2)/2/20e-6/512).^2;

Sn = 2*abs((Rs1-Rs2)/sqrt(2)/20e-6/512).^2;

Ss = 2*abs(S/20e-6/512).^2;

⌨️ 快捷键说明

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