%Maher Saleem 
% 1130258

n = -3:1:8;


% NOTE : no need to add zeros for empty indices, since sigMult, and SigAdd
% are implemented in a way to fix that
x = [-4,5,1,-2,-3,0,2,0,0,0,0,0];
y  = [0,0,6 , -3,-1,0,8,7,-2,0,0,0];
w  = [0,0,0,0,0,3,2,2,-1,0,-2,5];

%a)
figure
[x1 , n1] = sigshift(x , -n , 2);
stem(n1,x1)
grid

%b)
figure
[w2,n3] = sigshift(w , -n , 0);
 stem(n3,w2)
 grid

%c)
figure
[y2,n2 ] = sigshift(y , n , 2);
[c , n_c] = sigadd(x,n,y2,n2);
stem(n_c , c)
grid

%d)
figure
[w4,n4] = sigshift(w , n , -4);
[d,n5] = sigmult(w4,n4 , x , n);
stem(n5,d)
grid

%e)
figure
e = 3.5*y;
stem(n,e)
grid