Matlab Implementation of the CISL simulation