% 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.4 (c)
t1 = [0 1];
x1 = [0 0];
t2 = 1:0.01:2;
x2 = 2 * (t2 - 1);
t3 = [2 3];
x3 = [2 2];
t4 = 3:0.01:5;
x4 = 2*t4 - 4;
t = [t1 t2 t3 t4];
x = [x1 x2 x3 x4];
plot(t, x, 'LineWidth', 1.5);
axis([0 5 -1 7]);
xlabel('Time (sec)');
ylabel('x(t)');
title('1.4 (c)');
