MATLAB: Elliptical Integrals–MATLAB Equivalent for Mathematica’s EllipticE

complete elliptical integralselliptical integralfirst kindMATLABsecond kindthird kind

Hello, I'm converting a code from Mathematica to Matlab and there is a function (EllipticE) in Mathematica that I can't find its equivalent in Matlab. EllipticE computes a complete elliptical integral (Mathematica doesn't specify what kind (e.g. first, second or third)). Any help would be appreciated.
For example in Mathematica, EllipticE[0.4]= 1.399
What's the equivalent function in Matlab, i.e. F(0.4)= 1.399

Best Answer

Mathematica's EllipticE is the complete elliptic integral of the second kind.
Numerically in MATLAB, use ellipke and take the second output.