summaryrefslogtreecommitdiff
path: root/22/CH3/EX3.9/ch3ex9.sce
blob: b651f07e0cbb2cdb4330bbfe05c3cd654587d565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//signals and systems
//time domain analysis of discreet time systems
//iterative solution
clear;
close;
clc; 
n=(-2:10)';
y=[1;2;zeros(length(n)-2,1)];
x=[0;0;n(3:length(n))];
for k=1:length(n)-2
    y(k+2)=y(k+1)-0.24*y(k)+x(k+2)-2*x(k+1);
end;
clf;
plot2d3(n,y);
disp([msprintf([n,y])]);