《DSP using MATLAB》示例Example4.11】的更多相关文章

用到的性质 上代码: n = -5:10; x = rand(1,length(n)); k = -100:100; w = (pi/100)*k; % freqency between -pi and +pi , [0,pi] axis divided into 101 points. X = x * (exp(-j*pi/100)) .^ (n'*k); % DTFT of x % folding property y = fliplr(x); m = -fliplr(n); % signa…
上代码: 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'…
代码: b = [1, 0]; a = [1, -0.9]; % %% ---------------------------------------------- %% START a determine H(z) and sketch %% ---------------------------------------------- figure('NumberTitle', 'off', 'Name', 'Example4.11a H(z) its pole-zero plot') set…
代码: % 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…
代码: x = rand(1,11); n = 0:10; k = 0:500; w = (pi/500)*k; % [0,pi] axis divided into 501 points. X = x * (exp(-j*pi/500)) .^ (n'*k); % DTFT of x % signal shifted by two samples y = x; m = n + 2; Y = y * (exp(-j*pi/500)) .^ (m'*k); % DTFT of y = x(n-2)…
上代码: x1 = rand(1,11); x2 = rand(1,11); n = 0:10; alpha = 2; beta = 3; k = 0:500; w = (pi/500)*k; % [0,pi] axis divided into 501 points. X1 = x1 * (exp(-j*pi/500)) .^ (n'*k); % DTFT of x1 X2 = x2 * (exp(-j*pi/500)) .^ (n'*k); % DTFT of x2 x = alpha *…
上代码 % noise sequence 1 x = [3, 11, 7, 0, -1, 4, 2]; nx = [-3:3]; % given signal x(n) [y,ny] = sigshift(x,nx,2); % obtain x(n-2) set(gcf,'Color','white') subplot(2,1,1);stem(nx,x); title('sequence x(n)'); xlabel('n');ylabel('x(n)'); grid on subplot(2,…
代码: % 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…