《DSP using MATLAB》示例Example 8.20】的更多相关文章

先放子函数: function [C, B, A, rM] = dir2fs_r(h, r); % DIRECT-form to Frequency Sampling form conversion % ---------------------------------------------------------- % [C, B, A, rM] = dir2fs_r(h, r) % C = Row vector containing gains for parallel sections…
窗外的知了叽叽喳喳叫个不停,屋里温度应该有30°,伏天的日子难过啊! 频率域的方法来计算圆周移位 代码: 子函数的 function y = cirshftf(x, m, N) %% ----------------------------------------------------------------------- % Circular shift of m samples wrt size N in sequence x: (freq domain) % --------------…
代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Problem 4.20 \n\n'); banner();…
代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Problem 3.20 \n\n'); banner();…
代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Problem 2.20 \n\n'); banner();…
代码: % Discrete-time Signal x1(n) % Ts = 0.0002; n = -25:1:25; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*abs(nTs)); Ts = 0.001; n = -5:1:5; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*abs(nTs)); % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = x * sinc(Fs*…
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Discrete-time Signal Ts = 0.0002; n = -25:1:25; x = exp(-1000*abs(n*Ts)); % Discrete-time Fourier Transform %Wmax = 2*pi*2000; K = 500; k = 0:1:K; w = pi*k/K; % index ar…
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Continuous-time Fourier Transform Wmax = 2*pi*2000; K = 500; k = 0:1:K; % index array k for frequencies W = k*Wmax/K; % freqency between 0 and +pi, [0,pi] axis divided i…
上代码: b = [1]; a = [1, -1, 0.9]; n = [-20:120]; h = impz(b,a,n); set(gcf,'Color','white'); %subplot(2,1,1); stem(n,h); title('Impulse Response'); xlabel('n'); ylabel('h(n)'); grid on; x = stepseq(0,-20, 120); s = filter(b,a,x); figure; set(gcf,'Color'…
代码: % Discrete-time Signal x1(n) : Ts = 0.0002 Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x1 = exp(-1000*abs(nTs)); figure('NumberTitle', 'off', 'Name', 'Example3.23 Reconstructed From x1(n)'); set(gcf,'Color','white'); subplot(2,1,1); stairs(nTs*1000,x1…