File Exchange

image thumbnail

Elliptic Integrals and Functions

version 1.1 (15.2 KB) by

Elliptic function evaluation using AGM algorithm.

4 Downloads

Updated

View License

agm.m - function AGM calculates the Artihmetic Geometric Mean of A and B.

ellipj.m - function ELLIPJ Jacobi elliptic functions and Jacobi's amplitude (modified standard method, resolves problem with convergence).

ellipji.m - function ELLIPJI Jacobi elliptic functions of complex phase u.

elliptic12.m - function ELLIPTIC12 evaluates the value of the Incomplete Elliptic Integrals of the First, Second Kind and Jacobi's Zeta Function.

elliptic12i.m - function ELLIPTIC12i evaluates the Incomplete Elliptic Integrals of the First, Second Kind and Jacobi's Zeta Function for the complex value of phase U.

elliptic3.m - function ELLIPTIC3 evaluates incomplete elliptic integral of the third kind.

inversenomeq.m - function INVERSENOMEQ gives the value of Nome m = m(q).

jacobiThetaEta.m - function JACOBITHETAETA evaluates Jacobi's theta and eta functions.

nomeq.m - function NOMEQ gives the value of Nome q = q(m).

theta.m - THETA evaluates theta functions of four types.

Comments and Ratings (9)

Haneen

Haneen (view profile)

Is it possible to use this code to have the same output as this function gives in Mathmatica?
http://reference.wolfram.com/language/ref/EllipticTheta.html

i.e:
q = 0.0419;
V2 = EllipticTheta[2, 0, q]
V3 = EllipticTheta[3, 0, q]

Output:

V2= 0.906453
V3= 1.08381

Tian

Tian (view profile)

I am sorry to report the following bug in your Matlab functions. I use Matlab2013b and I find that the error message jumps out:

Error using .*
Matrix dimensions must agree.

Error in ellipj (line 95)
phin(:) = (2 .^ double(n(K))).*a(i,K).*u(I);

Error in ellipji (line 76)
[s,c,d] = ellipj(phi,m,tol);

But there is no bug when I use Matlab2010a. That is very strange.

Ali A

Ali A (view profile)

Ali A

Ali A (view profile)

I'm trying to find Elliptic Integral of the third kind for elliptic3(phi, m, c); that "c" is not between 0 to 1; but this m-file sending an error. This error appear while the c or n can be between -inf to +inf.
Thanks.

abdelhakim deboucha

Prasanna Ganesan

Very useful and well written. Thanks.

Dr R P GUPTA

good

Toby B

I needed to use incomplete elliptic integrals for the solving of a stress analysis problem.

I tried the equations using this file ("Elliptic Integrals of three types and Jacobian Elliptic Functions") and "Elliptic_Integrals.zip" by Thomas Hoffend.

Of the two, this one achieved answers closer to the table of pre-defined values.

I will mention however that the elliptic integral was only part of the solving method and I don't know whether elliptic12 was better just for my problem, but for an end answer of 0.174, elliptic12 as part of my coding gave me 0.1756, where as lelipke and lelipkf gave me 0.2022.

Updates

1.1

Change license to BSD

Various minor coorections, infinity bug.

MATLAB Release
MATLAB 7.0.1 (R14SP1)

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

» Watch video