Iterative Solution to Zero-Input Response
Using the initial conditions y[−1] = 2 and y[−2] = 1, use MATLAB to iteratively compute and then plot the zero-input response for the system described by (E² − 1.56E + 0.81)y[n] = (E + 3)x[n].
>> n = (-2:20)’; y = [1;2;zeros(length(n)-2,1)];
>> for k = 1:length(n)-2,
>> y(k+2) = 1.56*y(k+1)-0.81*y(k);
>> end;
>> clf; stem(n,y,’k’); xlabel(’n’); ylabel(’y[n]’); axis([-2 20 -1.5 2.5]);