Algorithm & Code Sharing ⋅ Writings ⋅ Arts ⋅ About |
Digital Signal Processing / DSP System Sebuah sistem DSP: y(n) = 0.5y(n-2) + x(n-1) dengan kondisi inisial y(-2) = 1, y(-1) = 0, x(-1) = -1, dan input x(n) = (0.5)n u(n). Tentukan input sinyal x(n) dan output sinyal y(n) untuk 20 sampel pertama. (sumber: http://mirza.dafturn.org/scilab/dsp.htm) Source Code: y=zeros(1,20) y=[1 0 y] n=0:1:19 x=0.5^n x=[0 -1 x] for n=1:20 y(n+2)=x(n+1)+0.5*y(n) end n=0:1:19 disp(x) disp(y) subplot(211) plot(n,x(3:22),'*r') xlabel('sampel number') ylabel('input x(n)') xgrid(1) subplot(212) plot(n,y(3:22),'*b') xlabel('sampel number') ylabel('output y(n)') xgrid(1) Lihat semua daftar ACS - Download: dsp.sce - Tanggal: 6 Juni 2013 - Kategori: Scilab |
© 2025 Muhammad Faruq Nuruddinsyah. All rights reserved. |