星期三, 11月 18, 2009

matlab 2009 11/19 01


% program file lab20091119w1.m
clear all;
clf;
x_n = 10*ones(1,400);
r = 2;
l = 1;
ts = 0.01;
a = [1/ts + r/l -1/ts];
b = [1/l];
y_n = filter(b,a,x_n);
n = 0:1:400-1;

subplot(211);
stem(n,x_n,'b');
grid;
subplot(212);
stem(n,y_n,'b');
grid;

沒有留言: