Fir_angle3.m 799 B

1234567891011121314151617181920212223242526
  1. function Hd = Fir_angle3
  2. %FIR_ANGLE3 返回离散时间滤波器对象。
  3. % MATLAB Code
  4. % Generated by MATLAB(R) 9.9 and Signal Processing Toolbox 8.5.
  5. % Generated on: 26-Oct-2022 17:32:33
  6. % Equiripple Lowpass filter designed using the FIRPM function.
  7. % All frequency values are in Hz.
  8. Fs = 500; % Sampling Frequency
  9. Fpass = 0.2; % Passband Frequency
  10. Fstop = 3; % Stopband Frequency
  11. Dpass = 0.057501127785; % Passband Ripple
  12. Dstop = 0.0001; % Stopband Attenuation
  13. dens = 20; % Density Factor
  14. % Calculate the order from the parameters using FIRPMORD.
  15. [N, Fo, Ao, W] = firpmord([Fpass, Fstop]/(Fs/2), [1 0], [Dpass, Dstop]);
  16. % Calculate the coefficients using the FIRPM function.
  17. b = firpm(N, Fo, Ao, W, {dens});
  18. Hd = dfilt.dffir(b);
  19. % [EOF]