% M-file names must start with an alphabetic character,
%   may contain any alphanumeric characters or underscores

clear;  % Clear variables and functions from memory.
clc;    % Clear command window.


% 1.2 (a)
% x(t) = sin(pi * t);
% delta_t = 0.1, 0.5, 0.9, 1.5, 2
t = 0:2:20;                  % Assign variable t as a vector with equally spaced elements.
x = sin(pi * t);               % Compute x = sin(pi * t) for each element in vector t, as a result, x will become a vector as well.
plot(t, x, 'LineWidth', 1.5);  % Plot vector x versus vector t, LineWidth=1.5
axis([0 20 -1 1]);             % Control axis scaling and appearance.
xlabel('Time (sec)');          % Adds text beside the X-axis on the current axis.
ylabel('x(t)');                % Adds text beside the Y-axis on the current axis.
title('1.2 (a)');              % Set Graph title.
