function [der1, der2, hess] = check_hessian(User,Cells,BS,Sim,t,Beta)

l=1;k=10;
c=1;b=2;

delta = 1e-4;

der1 = compute_derative(User,Cells,BS,Sim,Beta,t,l,k,c,b);

%User(l,k).current_rate = User(l,k).current_rate + delta;

BS(c,b).current_compression_bkhaul = BS(c,b).current_compression_bkhaul + delta;

der2 = compute_derative(User,Cells,BS,Sim,Beta,t,l,k,c,b);

hess = (der2 - der1)/delta;

%test BS
% c=1;
% b=8;
% BS(c,b).current_compression_bkhaul = BS(c,b).current_compression_bkhaul + delta;
% [obj_new, obj_wsr_new, obj_log1_new, obj_log2_new] = compute_obj(User,Cells,BS,Sim,t,Beta);
% 
% der = (obj_new - obj)/delta;

