%8
clc
clear
n=[-10:15]';
x=zeros(size(n));
ind=find(n>=0);
x(ind)=1;

subplot(2,1,1)
stem(n,x);
title('Lab1-Plot of #8 Unit Step Input');
xlabel('n');
ylabel('Amplitude of x');
grid on

y=zeros(size(n));
index_int_cond=find(n==-1);
y(index_int_cond)=4;

indnz=ind(1);
for i=indnz:length(x)
    y(i)=0.25*y(i-1)+x(i);
end
subplot(2,1,2)
stem(n,y,'r');
title('Unit Step Response with Initial Condition of y(-1) =4');
xlabel('n');
ylabel('Amplitude of y');
grid on