MATLAB code for Zusai & Lu "Poralization and segregation" paper.
- Extract the zip file.
- Run SingleSim1608.m for a one-shot simulation, as in Section 3.1 in the paper. It will load "FigJpegPrintNoLeg.m" to plot figures. It may take long time and huge memory to draw a figure like Fig 1-a,b in the paper, since the figure consists of as many independent points as the product of # periods and # agents (without any aggregation).
- Run MonteCarloIndefEnd1608 for a Monte Calro simulation with changing the value of one parameter, as in Section 3.2 in the paper. It will load "FigJpegPrint.m" to plot figures.