function resulting_vector = Calc_End_L(L,ll,expec)

last_L = numel(L);
last_small_l = numel(ll);
%---------------------------
% Lower end point
resulting_vector(1) = expec(1)*ll(1)-expec(2)*ll(2);
%---------------------------
% Upper end point
resulting_vector(last_L) = expec(last_small_l)*ll(last_small_l);		            
%---------------------------
% Copies the mid points from the input 
resulting_vector(2:last_L-1)= L(2:last_L-1);
