The following Matlab project contains the source code and Matlab examples used for returns and plots a cashflow using the martingale system in roulette. .
% MARTINGALE returns and plots a cashflow using the Martingale system in roulette
% [outcomes] = martingale(initbet, betuntil, maxbet, gamblercash,
% casinocash, betfactorfactor, totalnumberofbets, wheeltype)
% outcomes(:,1) cashflow of the casino
% outcomes(:,2) cashflow of the gambler
% outcomes(:,3) bets
% For instance, you can use the following values: