function [t,W] = bm416(n,m)

% n: number of steps
% m: number of paths

dt = 1/n;

t = zeros(1,n+1);
W = zeros(m,n+1);

for j=1:n
    t(j+1) = t(j) + dt;
    r = 2*(randn(m,1)>0)-1;
    % r = randn;
    W(:,j+1) = W(:,j) + sqrt(dt)*r;
end

end
