function [cost] = eval_cost(A,B,K,Q,R,Sigma_0);
%Computes the cost
P = dlyap((A-B*K)',Q+K'*R*K);
cost = trace(P * Sigma_0);

end

