moptimum.m

来自「这是几种滤波器的MATLAB的M文件源码」· M 代码 · 共 27 行

M
27
字号
function moptimum

%Program moptimum is for designing I-stage optimum decimator 		
%or interpolator (I=1,2,3 or 4). The program computes the decimation	
%factors, filter characteristics, and decimator efficiencies	
								
%The following parameters must be provided by the user:		
%	Fs	-	input sampling frequency			
%	M	-	overall decimation factor			
%	fp	-	passband edge frequency				
%	dp	-	overall passband deviation in +ve dB		
%	ds	-	overall stopband deviation in +ve dB

clear all;
Fs = 96000;		% sampling frequency in Hz
fp = 450;		% passband edge frequency in Hz
dp = 0.0864;	% overall passband deviation in +ve dB
ds = 60;			% overall stopband deviation in +ve dB
M = 96;			% overall decimation factor

EvalNStageDecimator(Fs,fp,dp,ds,M); % evaluate single stage decimator
for i=2:4	% evaluate all possible 2-, 3- and 4-stage decimators
   R = GetFactors(M,i);
	for j=1:size(R,1);
   	EvalNStageDecimator(Fs,fp,dp,ds,R(j,:));
	end
end

⌨️ 快捷键说明

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