% function echo_filter_tostudents:
%     1) ypologizei kai epistrefei thn kroustikh apokrish toy systhmatos, h(t)
%     2) filtrarei to shma eisodou signal kai paragei to shma e3odou y_echo
%
% Input:
% signal = shma pou 8elete na balete echo
% times = dianysma pou periexei tis xronikes stigmes - se seconds - pou 8eloume na
%         3ekina mia echo panw sto shma eisodou
% attenuations = dianysma pou periexei to platos ka8e hxous stis antistoixes xronikes stigmes
%                pou exete orisei sto dianysma times
% fs = syxnothta deigmatolhpsias, epistrefetai apo th synarthsh audioread
%
% Output:
% y_echo = e3odos tou GXA systhmatos (shma me echo)
% h = kroustikh apokrish tou systhmatos pou ylopoieitai

function [y_echo, h] = echo_filter_tostudents(signal, times, attenuations, fs)

% O prwtos syntelesths ths apokrishs h(t) gia t = 0
h(1) = % INSERT CODE HERE 

% Ypologismos ths kroustikhs apokrishs h(t) = delta(t) + Σ a_i delta(t - t_i)
for i = 1:length(times) % gia oses xronikes stigmes exete orisei sto dianysma times

	% Metatrepste tis xronikes stigmes se deigmata
    samples(i) = % INSERT CODE HERE 
	
	% 8este ta swsta plath tis xronikes stigmes t_i
    h(floor(samples(i))) = % INSERT CODE HERE  
end

% filtrarisma tou shmatos - paragwgh e3odou mesw ths pra3hs ths syneli3hs
% xrhsimopoihste th synarthsh conv tou MATLAB me orismata ta shmata ths
% kroustikhs apokrishs kai ths eisodou
y_echo = % INSERT CODE HERE  