function y=mitlef(alpha,beta,z,N)

% Function MITLEF(alpha,beta,z,N)
% 	Evaluation of the Mittag-Leffler function in two parameters:
% 	E_{alpha,beta}(z), using its series expansion.
%
% PARAMETERS:
%	alpha	- first index (scalar)
%	beta	- second index (scalar)
%	z	- row vector of values of the function argument
%	N	- number of terms in the power expansion (scalar) - OPTIONAL, default N=100.

if nargin<4, N=100; end

m1=max(size(z));
m2=min(size(z));
if m2>1, z=z(1,:); end

k=repmat((1:N)',1,m1);
t=repmat(z,N,1);
t=t.^(k-1);
a=repmat(gamma(alpha*((1:N)'-1)+beta), 1, m1);
y=sum(t./a);


