You can use Matlab’s profile function to get some useful information about your scripts. For example, running the profiler around CellOrganizer’s demo2D00 Report from running a profile on demo2D00.
Utilize graph eigenvectors for partitioning. Evaluate partitioning results using METIS, a widely used graph partitioning software. Methodology Implement basic graph partitioning algorithms in MATLAB.