%%%%%%%%
function [a b c] = Lpl(X, lambda,p, m)
a = 0;
b = 0;
c = 0;
for i = 1:m
    a = a + p(i)*((2*X(i,:)*lambda-1)*X(i,1)*sum(lambda.^2)-2*lambda(1)*(X(i,:)*lambda-1)^2)/(sum(lambda.^2)^2);
    b = b + p(i)*((2*X(i,:)*lambda-1)*X(i,2)*sum(lambda.^2)-2*lambda(2)*(X(i,:)*lambda-1)^2)/(sum(lambda.^2)^2);
    c = c + p(i)*((2*X(i,:)*lambda-1)*X(i,3)*sum(lambda.^2)-2*lambda(3)*(X(i,:)*lambda-1)^2)/(sum(lambda.^2)^2);
end

a = a/m;
b = b/m;
c = c/m;