matlab 求极限

问题描述:

matlab 求极限
lim(1+1/2+1/3+1/4+……+1/n-lnn),n->无穷

>>syms x n;
>>sol=limit(symsum(1/x,x,1,n)-log(n),n,inf)
sol =
eulergamma
>> vpa(sol,20)
ans =
0.57721566490153286061