You could write your own simulator by hand using the MATLAB scripting language and/or you could employ the help of one or more of the following toolboxes and packages.
Another option is the implementation of LEACH and is available at LEACH (Low Energy Adaptive Clustering Hierarchy protocol) - File Exchange - MATLAB Central. However this implementation only considers the parameters like energy consumption and packet delivery to sink. A more detailed model can be created by adding path-loss factor to the delivery channel.
Using MATLAB is recommended only for initial evaluation in a network scenario, as parameters such as BER(bit error rate) cannot be evaluated precisely. So use of a network simulator(such as NS-3) or a network framework with a discrete event simulator(such as MiXiM with Omnet++) is recommended.