《DSP using MATLAB》Problem 7.1

Posted ky027wh-sx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了《DSP using MATLAB》Problem 7.1相关的知识,希望对你有一定的参考价值。

        只有春节那么几天才能和家人团聚,看着爸爸妈妈一年比一年老,自己还是一无所有,照顾好自己尚且惭愧,真是悲从中来,又能怎么办呢,

唯有奋发努力,时不我待,多想想怎么赚钱,加油。

 

技术图片

代码:

function [delta1, delta2] = db2delta(Rp, As)
% -------------------------------------------------
% Converts dB specs Rp and As into 
%   absolute specs delta1 and delta2
%  [delta1, delta2] = delta2db(Rp, As)
%  delta1 = passband tolerance ( or ripple), absolute specs
%  delta2 = stopband tolerance ( or ripple), absolute specs 
%      Rp = passband ripple in dB
%      As = stopband attenuation in dB
%
temp = 10^(-Rp/20);
delta1 = (1-temp) / (1+temp);

delta2 = (1+delta1)*(10^(-As/20));

  

function [Rp, As] = delta2db(delta1, delta2)
% -------------------------------------------------
% Converts absolute specs delta1 and delta2 into 
%   dB specs Rp and As
%  [Rp, As] = delta2db(delta1, delta2)
%  delta1 = passband tolerance ( or ripple), absolute specs
%  delta2 = stopband tolerance ( or ripple), absolute specs 
%      Rp = passband ripple in dB
%      As = stopband attenuation in dB
%

Rp = -20 * log10( (1-delta1)/(1+delta1));
As = -20 * log10( delta2 / (1+delta1));

  运行结果:

技术图片

以上是关于《DSP using MATLAB》Problem 7.1的主要内容,如果未能解决你的问题,请参考以下文章

《DSP using MATLAB》Problem 5.7

《DSP using MATLAB》Problem 6.7

《DSP using MATLAB》Problem 6.8

《DSP using MATLAB》Problem 3.12

《DSP using MATLAB》Problem 4.17

《DSP using MATLAB》Problem 3.5