亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cepspec.m

?? 無參數功率譜估計
?? M
字號:
function [SpectrumOut, Message, StatusFlag] = CepSpec(Input, BandInfo, OutOptions)% Function to compute the power spectrum from the cepstrum via the method% described in "Smoothed Nonparametric Spectral Estimation Via Cepstrum % Thresholding" by Perte Stocia and Niclas Sandgren, IEEE Signal Processing % Magazine, November 2006 vol 23, number 6%% This software copyright by Steve Lutes 11/11/2006. All rights reserved% Commerical use requires a license. Non-commerical use requires acknowledging% Steve Lutes as author of this software. Send e-mail to utahraptor@intergate.com for% more info.% % How to use: %%	[SpectrumOut, Message, StatusFlag] = CepSpec(Input, BandInfo, OutOptions) %%---Outputs------------------------------------------------------------------------------%%	SpectrumOut- an array length(Input) / 2 points long holding the%				 power spectrum of Input.%%	Message - a text string telling of problems, if any. If no trouble, Message = 'Ok' plus%			  whatever output option user has specified%%	StatusFlag- a numeric scalar telling of trouble. = 0 means all ok, = 1 means trouble%%---Inputs-------------------------------------------------------------------------------%%	Input- a numeric array (row or colum vector) of input data%%	BandInfo- a string of characters. Enter 'narrow' for a narrow-band signal%			  or 'wide' for a wide-band signal. Mixed, all upper - or all lower-case%			  will work. e.g. 'narrow', 'NARROW', 'Wide'.%%	%	OutOptions- a string determining how the estimate of the power specta is %			    numerically altered. Mixed case, all lower case or all upper case are%				valid. Options are:%%				[] or 'raw' - nothing happens. Spectral estimate is not altered%%				'norm' - All spectral values are normalized to one. This is done%					 	 by dividing all values by the maximum. This%						 PowerSpectrumNormalized(i) =  PowerSpectrum(i) / max(PowerSpectrum)%			%%				'dB10' - PowerSpectrumdB10(i) =  10*log10[PowerSpectrum(i) / max(PowerSpectrum)]%						 This is for a power signal%%				'dB20' - PowerSpectrumdB20(i) =  20*log10[PowerSpectrum(i) / max(PowerSpectrum)]%						 This is for a voltage or current signal%%				'psd' - PowerSpectrum_psd(i) = PowerSpectrum(i)/ sum(PowerSpectrum(i))%	                    This gives the power spectral density function. Dividing out all%						values of PowerSpectrum(i) by sum(PowerSpectrum(i)) makes sure that%						sum(PowerSpectrum_psd(i)) = 1. This is how a probability density function%						behaves.%%				'log10' - PowerSpectrum_log10(i) = log10(PowerSpectrum(i)). Log10 is the %						  log to the base 10%%				'ln' - PowerSpectrum_ln(i) = ln(PowerSpectrum(i)) or log to the base e (natural log)%				% All numerics ok 11/11/2006Message = 'Ok';  % Set output message to default valueStatusFlag = 0;  % Init trouble flagOutOptionsList = strvcat('raw','norm','dB10','dB20','psd','log10','ln'); % List of valid output options% Start code for error trap on Input dataif isempty(Input) == 1		% Trap for empty value of input data. Ok 11/12/2006	disp(['Empty value for input data entered. Please use a row or column vector for the input data.'])	Message = ['Empty value for input data entered. Please use a row or column vector for the input data.'];	StatusFlag = 1;	returnelseif isnumeric(Input) == 0	% Trap for non-numeric value(s) of input data. Ok 11/12/2006	disp(['Non-numeric value(s) for input data entered. Please use a numeric row or column vector for the input data.'])	Message = ['Non-numeric value(s) for input data entered. Please use a numeric row or column vector for the input data.'];	StatusFlag = 1;	returnelseif sum(size(Input)) <= 2	% Trap for scalar value(s) of input data. Ok 11/12/2006	disp(['Scalar for input data entered. Please use a numeric row or column vector for the input data.'])	Message = ['Scalar for input data entered. Please use a numeric row or column vector for the input data.'];	StatusFlag = 1;	return	elseif all(size(Input) > 1) == 1	% Trap for scalar value(s) of input data. Ok 11/12/2006	disp(['Matrix for input data entered. Please use a numeric row or column vector for the input data.'])	Message = ['Matrix for input data entered. Please use a numeric row or column vector for the input data.'];	StatusFlag = 1;	return	end% End code for error trap on Input data% Start code to error-trap the bandwidth type specification if isempty(BandInfo) == 1		% Trap for empty value of BandInfo Ok 11/12/2006	disp(['Empty value for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow''. Mixed, lower or upper case is ok.'])	Message = ['Empty value for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow''. Mixed, lower or upper case is ok.'];	StatusFlag = 1;	return	elseif ischar(BandInfo) == 0	% Trap for non-character value of BandInfo Ok 11/12/2006	disp(['Non character value for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow'' *as a text string*. Mixed, lower or upper case is ok.'])	Message = ['Non character value for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow'' *as a text string*. Mixed, lower or upper case is ok.'];	StatusFlag = 1;	return	else	BandInfo = lower(BandInfo);		if isempty(strmatch(BandInfo, strvcat('narrow','wide') , 'exact')) == 1				% Trap for non-character value of BandInfo Ok 11/12/2006		disp(['Invalid option for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow'' *as a text string*. Mixed, lower or upper case is ok.'])		Message = ['Invalid option for bandwidth spec (wide vs. narrow) entered. Please enter ''wide'' or ''narrow'' *as a text string*. Mixed, lower or upper case is ok.'];		StatusFlag = 1;		return		end	end% End code to error-trap the bandwidth type specification% Start code for output options error trappingif isempty(OutOptions) == 1;		OutOptions = ['raw'];	elseif ischar(OutOptions) == 0;		% Trap for non-character value of OutOptions Ok 11/12/2006		disp(['Non-character value entered for OutOptions. Please enter ''raw'', ''norm'', ''dB10'', ''dB20'', ''psd'', ''log10'', or ''ln''. Mixed, lower or upper case is ok. ']);		Message = ['Non-character value entered for OutOptions. Please enter ''raw'', ''norm'', ''dB10'', ''dB20'', ''psd'', ''log10'', or ''ln''. Mixed, lower or upper case is ok. '];		StatusFlag = 1;		return			else			OutOptions = lower(OutOptions);			if isempty(strmatch(OutOptions, OutOptionsList , 'exact')) == 1						% Trap for invalid value of OutOptions		disp(['Invalid output option. Please enter ''raw'', ''norm'', ''dB10'', ''dB20'', ''psd'', ''log10'', or ''ln''. Mixed, lower or upper case is ok. ']);		Message = ['Invalid output option. Please enter ''raw'', ''norm'', ''dB10'', ''dB20'', ''psd'', ''log10'', or ''ln''. Mixed, lower or upper case is ok. '];		StatusFlag = 1;		return	endend% End code for output options error trapping% Make Input a column vectorif size(Input,1) > 1 	Input = Input';	endN = length(Input); % Compute the number of input data pointsMidPoint = fix(N/2); % Computer midpoint of input data% Start code to estimate power spectrumPwrSpecEst = abs(fft(Input)).^2; % Compute raw power spectrum as Real^2 + Imag^2 i.e. raw periodogramCep1 = ifft(log(PwrSpecEst)); % Compute cepstrum% Start code to threshold cepstrum via equation 36 in Stocia and Sandgren paper% Start code to determine value of Mu via% equations 37 and 38 in Stocia and Sandgren paperif strcmp(BandInfo,'wide') == 1		% Start code for the wideband case	if N < 500				% Case where signal < 500 points		Mu = 4;			else		% Case where signal = or > 500 points		Mu = 5; 			end		% End code for the wideband case			elseif strcmp(BandInfo,'narrow') == 1	% Start code for the narrow band case	if N < 500				% Case where signal < 500 points		Mu = 2;			else		% Case where signal = or > 500 points		Mu = 3; 			end		% End code for the narrow band case		end% End code to determine value of MuMessage = strvcat(Message,['Signal is designated as ' BandInfo '-band.'], ['Mu = ' num2str(Mu)], ['Number of Data Points = ' num2str(N)]);% Start code for thresholding cepstrum% Compute thresholds for first, last and (N/2) element of % cepstrum. Mu is from eqns 37 and 38 in Stocia and Sandgren paper% Equation for threshold is equation 36 in Stocia and Sandgren paperFirstAndLastThreshold = (Mu*pi)/sqrt(3*N);% Compute threshold for the rest of the cepstrumMiddleThreshold = (Mu*pi)/sqrt(6*N);% Form vector of threshold values for threshold comparisons% Enter the proper threshold levels for the first,% and last cepstrum values into ThresholdVectorThresholdVector(1) = FirstAndLastThreshold;ThresholdVector(N) = FirstAndLastThreshold;% Compute threshold for values of cepstrum from% 2 to N - 1ThresholdVector(2:1:N-1) = MiddleThreshold;% Enter the proper threshold levels for the midpoint % cepstrum value into ThresholdVectorThresholdVector(MidPoint) = FirstAndLastThreshold; % Compute a masking vector. All places where % abs(real(Cep1)) < or = threshold will be zero % in the masking vector. If  abs(real(Cep1)) > Threshold% then the corresponding place in masking vector = 1MaskVector = abs(real(Cep1)) > ThresholdVector;% Multiply by mask to set the right coeffs = 0Cep1 = MaskVector.*Cep1;% End code to threshold cepstrum% Start code to compute power spectrum estimate from thresholded cepstrumIndex =[1:1:MidPoint]; % Define a index vector [1.....N2]PwrSpecEstCep = exp(real(fft(Cep1))); % Power spectrum estimate from thresholded cepstrum% Compute scale factor (equation 41 in Stocia and Sandgren paper)ScaleConstant = sum(PwrSpecEst(Index).*PwrSpecEstCep(Index))/ sum(PwrSpecEstCep(Index).^2);SpectrumOut = ScaleConstant*PwrSpecEstCep(Index); % Scale to get final result% End code to compute power spectrum estimate from thresholded cepstrum% End code to estimate power spectrum% Start code to make the output the PSD, DB, normalized, etcswitch OutOptions;	case {'raw'}				% Do nothing to power spectrum		Message = strvcat(Message, 'Raw output option selected.', 'Power spectrum has not been altered');			case {'norm'}		% User wants output spectra normalized by highest value				% Normalize power spectrum by dividing all values by max(power spectrum)		SpectrumOut = SpectrumOut./max(SpectrumOut);					% Give a message		Message = strvcat(Message, 'Normalized output option selected.', 'Power spectrum has normalized by its maximum.');			case {'db10'}		% User wants output spectra in power dB 		% i.e. PowerSpectrumdB10(i) =  10*log10[PowerSpectrum(i) / max(PowerSpectrum)				% Compute power spectrum for the dB10 case i.e.		% i.e. PowerSpectrumdB10(i) =  10*log10[PowerSpectrum(i) / max(PowerSpectrum)		SpectrumOut = 10*log10(SpectrumOut./max(SpectrumOut));					% Give a message		Message = strvcat(Message, 'Decibel (power ratio i.e. 10*log10[PowerSpectrum(i) / max(PowerSpectrum) ) output option selected.', 'Power spectrum is in decibels.');		case {'db20'}		% User wants output spectra in voltage or current dB 		% i.e. PowerSpectrumdB20(i) =  20*log10[PowerSpectrum(i) / max(PowerSpectrum)				% Compute power spectrum for the dB20 case i.e.		% i.e. PowerSpectrumdB10(i) =  20*log10[PowerSpectrum(i) / max(PowerSpectrum)		SpectrumOut = 20*log10(SpectrumOut./max(SpectrumOut));					% Give a message		Message = strvcat(Message, 'Decibel (voltage or current ratio i.e. 20*log10[PowerSpectrum(i) / max(PowerSpectrum) ) output option selected.', 'Power spectrum is in decibels.');	case {'psd'}		% User wants output as probablity density function i.e the power spectral density function		SpectrumOut = SpectrumOut./sum(SpectrumOut);				% Give a message		Message = strvcat(Message, 'Power spectral density option selected', 'Power spectrum is a probability density function.');		case{'log10'}		% User wants output as PowerSpectrum_log10(i) = log10(PowerSpectrum(i))		SpectrumOut = log10(SpectrumOut);				% Give a message		Message = strvcat(Message, 'Log to base 10 option selected (PowerSpectrumOut(i) = log10(PowerSpectrum(i))', 'Power spectrum is in log to the base 10 units.');		case{'ln'}		% User wants output as PowerSpectrum_n(i) = ln(PowerSpectrum(i))		SpectrumOut = log(SpectrumOut);				% Give a message		Message = strvcat(Message, 'Log to base e (natural log) option selected (PowerSpectrumOut(i) = ln(PowerSpectrum(i))', 'Power spectrum is in log to the base e (natural log) units.');end% End code to make the output the PSD, DB, normalized, etc

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产九色精品成人porny| 一区二区三区中文免费| 91精品国产免费久久综合| 欧美亚洲国产怡红院影院| 国产69精品久久99不卡| 国产福利一区在线| 丰满少妇在线播放bd日韩电影| 美腿丝袜在线亚洲一区| 蜜桃视频第一区免费观看| 免费成人小视频| 精品一区二区日韩| 国产成人超碰人人澡人人澡| 国产成人免费xxxxxxxx| 国产福利一区在线| 91亚洲国产成人精品一区二三 | 丝袜亚洲另类欧美综合| 天堂影院一区二区| 美国av一区二区| 韩国女主播成人在线| 国产成人亚洲综合色影视| 成人av综合在线| 色妞www精品视频| 7799精品视频| 久久久国际精品| 一区二区中文视频| 午夜电影网亚洲视频| 免费人成黄页网站在线一区二区| 国产精品综合一区二区| 色综合久久综合中文综合网| 欧美高清你懂得| 国产亚洲精品bt天堂精选| 中文字幕中文在线不卡住| 偷拍与自拍一区| 国产成人亚洲精品青草天美| 欧美在线播放高清精品| 欧美mv日韩mv国产网站| 亚洲色图欧美在线| 日本不卡免费在线视频| 99久久久久久| 欧美精品一区二区精品网| 亚洲女厕所小便bbb| 激情都市一区二区| 欧美日韩一区久久| 国产女人水真多18毛片18精品视频| 一区二区免费在线| 激情久久五月天| 欧美日韩成人在线一区| 中文字幕亚洲欧美在线不卡| 久久国产人妖系列| 欧美在线播放高清精品| 国产精品电影一区二区三区| 日韩1区2区日韩1区2区| 91精彩视频在线| 国产精品嫩草影院com| 青青草97国产精品免费观看| 色综合网色综合| 国产视频视频一区| 久久精品噜噜噜成人88aⅴ| 91精品1区2区| 亚洲精品一二三区| 成人免费三级在线| 久久久久免费观看| 国产一区二区不卡| 久久―日本道色综合久久| 免费av网站大全久久| 欧美三级一区二区| 夜夜操天天操亚洲| 色系网站成人免费| 亚洲视频 欧洲视频| 国产成人综合在线| 久久婷婷久久一区二区三区| 五月婷婷激情综合网| 欧美日韩一区二区三区免费看| 中文字幕在线不卡一区| 99久久婷婷国产精品综合| 国产精品成人午夜| 色一情一乱一乱一91av| 一区二区三区波多野结衣在线观看| 91影视在线播放| 最新国产成人在线观看| 波波电影院一区二区三区| 中文字幕免费观看一区| www.日韩在线| 亚洲精品一二三| 欧洲人成人精品| 亚洲va在线va天堂| 欧美一区二区三区男人的天堂| 无吗不卡中文字幕| 欧美不卡一区二区三区| 韩国在线一区二区| 综合久久综合久久| 欧美日韩精品专区| 国内精品写真在线观看| 国产网站一区二区三区| av资源网一区| 亚洲va国产va欧美va观看| 欧美一卡在线观看| 国产成人在线免费观看| 综合亚洲深深色噜噜狠狠网站| 色综合天天综合给合国产| 亚洲国产视频直播| 精品国产三级电影在线观看| 国产盗摄一区二区| 一区二区三区毛片| 日韩三级免费观看| 白白色 亚洲乱淫| 五月天中文字幕一区二区| 精品国产99国产精品| 99热在这里有精品免费| 午夜欧美视频在线观看| 久久在线免费观看| 日本福利一区二区| 精品一区二区精品| 樱花草国产18久久久久| 精品对白一区国产伦| 91丨porny丨户外露出| 美女一区二区在线观看| 日韩毛片精品高清免费| 欧美成人一区二区三区片免费| 99视频精品全部免费在线| 久久精品国产一区二区| 亚洲欧美日韩一区二区| 欧美v亚洲v综合ⅴ国产v| 色噜噜偷拍精品综合在线| 国产1区2区3区精品美女| 日韩二区三区四区| 亚洲九九爱视频| 中文字幕av资源一区| 4438x成人网最大色成网站| av影院午夜一区| 韩国女主播一区| 蜜桃av一区二区在线观看| 亚洲免费在线视频一区 二区| 久久久美女毛片| 精品免费一区二区三区| 欧美另类z0zxhd电影| 色狠狠一区二区| 不卡av电影在线播放| 国产精品一区在线观看乱码| 麻豆精品久久精品色综合| 午夜一区二区三区视频| 综合久久给合久久狠狠狠97色| 久久综合中文字幕| 久久综合久色欧美综合狠狠| 91麻豆精品国产综合久久久久久| 欧美三级电影一区| 欧美日韩精品欧美日韩精品一| 在线观看av不卡| 欧美午夜影院一区| 欧美视频在线一区二区三区| 色婷婷久久99综合精品jk白丝| 91猫先生在线| 91福利在线观看| 欧美日韩国产经典色站一区二区三区 | 韩国女主播成人在线观看| 久久91精品国产91久久小草| 蜜桃av一区二区三区| 麻豆成人在线观看| 久久成人久久爱| 国产成人精品免费在线| 成人免费观看视频| 一本到一区二区三区| 欧美综合亚洲图片综合区| 欧美日韩国产一区| 日韩欧美在线网站| 国产网红主播福利一区二区| 中文字幕在线视频一区| 亚洲精品福利视频网站| 日韩综合一区二区| 久久成人羞羞网站| 国产成人免费9x9x人网站视频| 99精品欧美一区| 欧美日韩国产bt| 国产欧美一区二区精品秋霞影院 | 国产成人午夜99999| 91免费看视频| 91精品国产欧美日韩| 国产日韩精品视频一区| 亚洲综合视频在线观看| 午夜视频在线观看一区二区 | 天天色图综合网| 国产一区二区中文字幕| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩精品一区二区三区视频在线观看 | 日韩av一区二区三区| 国产成人欧美日韩在线电影| 在线观看av一区二区| 亚洲精品在线免费观看视频| 专区另类欧美日韩| 美女视频免费一区| 91丨porny丨在线| 精品粉嫩aⅴ一区二区三区四区| 亚洲少妇中出一区| 精品一区二区成人精品| 欧美日韩一区二区在线观看| 国产精品每日更新| 久久国产精品色| 欧美伊人久久大香线蕉综合69| wwwwxxxxx欧美| 视频一区视频二区中文|