% script Chapter2_1.m
% Plot a discrete-time signal using Matlab
% we need two vectors to plot one-dimensional signal
% the first vector defines the horizontal axes:
%samples points to calculate the signal values.
% the second one defines the values of the signal 
% at samples points (vertical axes)

n = -3:3;%first vector
%x[n]=0 for all other n.
x = [2,-1,-3,5,2,-1,7];%second vector
stem(n,x,'filled');
xlabel('Time Samples: n');
ylabel('x[n]: Signal values');
title('Discrete-Time Signal');
axis([-4 4 -4 8]);

