資源簡介
以A計權方式測量聲卡聲壓級-SLM.zip
這個程序是測量聲卡聲壓,并以A計權方式轉化為聲壓級。
里面有英文講義
這個程序是測量聲卡聲壓,并以A計權方式轉化為聲壓級。
里面有英文講義

代碼片段和文件信息
function?analyzeSignal(xFs)
%?ANALYZESIGNAL?Evaluates?dBA?level?of?input?signal.
%????ANALYZESIGNAL?Uses?a?sliding?window?to?evaluate?the
%????signal?level?(in?dBA).?Results?are?graphed?for?
%????comparison?to?known?dBA?level?values.
%
%?Author:?Douglas?R.?Lanman?11/22/05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Set?analysis?options.
%?Choose?response?type.
%?Note:?{‘fast‘?=?~125?ms?‘slow‘?=?~1.0?s}
responseType?=?‘slow‘;
%?Set?calibration?constant.
%?Note:?A?quite?location?will?be?~55?dBA.
C?=?72;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Part?I:?Analyze?input?signal.
%?Load?default?wave?sound?file?(if?none?provided).
%?See:?http://www.swarthmore.edu/NatSci/sciproject/noise/noisequant.html
if?~exist(‘x‘)
???[xFsnBits]?=?wavread(‘./examples/trashtruck.wav‘);
???t?=?(1/Fs)*[0:(length(x)-1)];?t?=?t+81;
else
???%?Determine?sample?times.
???t?=?(1/Fs)*[0:(length(x)-1)];
end
%?Determine?FFT?window?size.
%?Note:?Use?nearest?power?of?two?for?response?type.
if?strcmp(responseType‘slow‘)
???duration?=?1.0;
else
???duration?=?0.125;
end
N?=?ceil(duration*Fs);
N?=?2^nextpow2(N);
%?Estimate?signal?level?(within?each?windowed?segment).
windowStart?=?[1:N:(length(x)-N)];
dBA?=?zeros(length(windowStart)1);
windowTime?=?t(windowStart+round((N-1)/2));
for?i?=?[1:length(windowStart)]
???[XdBA(i)]?=?estimateLevel(x(windowStart(i)-1+[1:N])FsC);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Part?II:?Plot?results.
%?Plot?input?signal.
figure(2);?clf;
plot(tx);
title(‘Input?Signal‘);
xlabel(‘Elapsed?Time?(sec.)‘);
ylabel(‘Normalized?Voltage‘);
xlim([t(1)?t(end)]);
grid?on;
%?Plot?estimated?signal?level.
figure(3);?clf;
plot(windowTimedBA‘LineWidth‘2);
title(‘A-weighted?Signal?Level‘);
xlabel(‘Elapsed?Time?(sec.)‘);
ylabel(‘Signal?Level?(dBA)‘);
xlim([t(1)?t(end)]);
grid?on;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????2070??2005-11-29?12:54??analyzeSignal.m
?????文件?????????808??2005-11-29?12:37??estimateLevel.m
?????文件????????1114??2005-11-29?12:40??filterA.m
?????文件????????1673??2005-11-30?00:31??initDisplay.m
?????文件????????1064??2005-11-29?19:12??initSoundCard.m
?????文件????????1944??2005-11-29?14:24??runCalibration.m
?????文件????????1165??2005-12-15?10:55??SLM.m
?????文件??????203573??2005-12-15?10:52??SLM.pdf
?????文件?????????527??2005-11-30?00:31??stopSoundCard.m
?????文件?????????859??2005-11-29?12:44??updateDisplay.m
?????文件?????2756318??2005-11-22?15:49??examples\trashtruck.wav
?????目錄???????????0??2005-11-22?15:49??examples\
- 上一篇:強力U盤數據恢復軟件v3.0.0.1免費安裝版
- 下一篇:聯想 G450
評論
共有 條評論