% Standard parameters
dt = 0.01;
df = 0.01;
f = -10:df:10;

% First signal x1(t)
t = -5:dt:0;
x1 = % INSERT CODE HERE
M = exp(-j*2*pi*f'*t);
X1 = % INSERT CODE HERE 
Minv = exp(j*2*pi*t'*f);
x1est = % INSERT CODE HERE
subplot(221); plot(t, x1est); hold on; plot(t, x1); 
legend('Practice', 'Theory'); xlabel('Time'); title('i.'); grid;
axis tight;

% Second signal x2(t)
t = -5:dt:5;
x2 = % INSERT CODE HERE - use rectpuls
M = exp(-j*2*pi*f'*t);
X2 = % INSERT CODE HERE 
Minv = exp(j*2*pi*t'*f);
x2est = % INSERT CODE HERE;
subplot(222); plot(t, x2est); hold on; plot(t, x2); 
legend('Practice', 'Theory'); xlabel('Time'); title('ii.'); grid;
axis tight;

% Third signal x3(t)
t = -5:dt:5;
x3 = % INSERT CODE HERE - use tripuls
M = exp(-j*2*pi*f'*t);
X3 = % INSERT CODE HERE 
Minv = exp(j*2*pi*t'*f);
x3est = % INSERT CODE HERE
subplot(223); plot(t, x3est); hold on; plot(t, x3); 
legend('Practice', 'Theory'); xlabel('Time'); title('iii.'); grid;
axis tight

% Fourth signal x4(t)
t = -5:dt:5;
x4 = % INSERT CODE HERE
M = exp(-j*2*pi*f'*t);
X4 = % INSERT CODE HERE 
Minv = exp(j*2*pi*t'*f);
x4est = % INSERT CODE HERE
subplot(224); plot(t, x4est); hold on; plot(t, x4); 
legend('Practice', 'Theory'); xlabel('Time'); title('iv.'); grid;
axis tight