function [ derivative_fun, ic, dvar ] = first_derivative_vs2( var, fun )

N=length(fun);
ic=(2:1:N-1);
dvar=var(2)-var(1);
for i=2:N-1
    dfun(i)=fun(i+1)-fun(i-1);
end
derivative_fun=dfun/(2*dvar);

end

