function [tVec, pLevy, pBrown] = LevBrComp(nSteps,mu)

t = 2;          % final time
dt = t/nSteps;  % step in time

dtm = dt^(1/mu);
dts = sqrt(dt);

tVec  = zeros(nSteps+1,1);
pLevy = zeros(nSteps+1,1);
pBrown= zeros(nSteps+1,1);

L = 0;
B = 0;

for k=1:nSteps

        % Levy (symmetrical alpha-stable)

	V = -pi/2+pi*rand;  % uniform in (-pi/2,pi/2)
	W = -log(rand);     % exponentially distributed with mean 1

	xi = sin(mu*V)/(cos(V)^(1/mu))*(cos(V-mu*V)/W)^((1-mu)/mu);
        L = L + dtm*xi;

        % Brown

        r = randn;
        B = B + dts*r;

        % Save results

        pLevy(k+1) = L;
        pBrown(k+1) = B;
        tVec(k+1) = k*dt;
end


end
