File Exchange

image thumbnail

harmonic.m

version 1.0 (447 Bytes) by

Harmonic(n) is an estimate of the nth harmonic number.

7 Downloads

Updated

No License

harmonic(n) is an estimate of the nth harmonic number. Also works for arbitrary nonzero complex arguments z, though it may not be accurate if |z|
is too small (|z| should be greater than 1).

Comments and Ratings (2)

Jonathan

Thanks for posting.

The Euler-Mascheroni constant in the file is wrong. Should be 0.5772156649, not 0.5772196649.
http://mathworld.wolfram.com/Euler-MascheroniConstant.html

Can also compute harmonic(z) using:
0.5772156649015328606 + psi(z+1)

ANTONIO TELES

Only information!
Thanks!
Teles

MATLAB Release
MATLAB 6.0 (R12)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video