[K,E] =
ellipke(M,tol) computes
the complete elliptic integral to accuracy tol.
The default value of tol is eps.
Increase tol for a less accurate but more quickly
computed answer.

Plot the complete elliptic integrals of the first and second kind for the allowed range of M.

M = 0:0.01:1;
[K,E] = ellipke(M);
plot(M,K,M,E)
grid on
xlabel('M')
title('Complete Elliptic Integrals of First and Second Kind')
legend('First kind','Second kind')

The default value of tol is eps. Find the runtime with the default value for arbitrary M using tic and toc. Increase tol by a factor of thousand and find the runtime. Compare the runtimes.