Mercurial > hg > ishara
view general/numerical/scalar/zeta.m @ 16:db7f4afd27c5
Rearranging numerical toolbox.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:20:44 +0000 |
parents | general/numerical/zeta.m@e44f49929e56 |
children |
line wrap: on
line source
function [f] = zeta(z) % zeta - Riemann Zeta function % % zeta :: complex -> complex. % %tested on version 5.3.1 % % This program calculates the Riemann Zeta function % for the elements of Z using the Dirichlet deta function. % Z may be complex and any size. Best accuracy for abs(z)<80. % % Has a pole at z=1, zeros for z=(-even integers), % infinite number of zeros for z=1/2+i*y % % %see also: Eta, Deta, Lambda, Betad, Bern, Euler %see also: mhelp zeta %Paul Godfrey %pgodfrey@conexant.com %3-24-01 zz=2.^z; k = zz./(zz-2); f=k.*deta(z,1); p=find(z==1); if ~isempty(p) f(p)=Inf; end return