Each folder contains the code for protocol in finding the average energy of the sensor network after certain number of logical rounds specified by the name of the file. Run the code in MATLAB v7.6 to obtain the results. Visit http://bit.ly/186VWzV to download the published paper "Comparison of energy efficient routing protocols for heterogeneous wireless sensor networks".