Use Low Energy Adaptive Clustering Hierarchy (LEACH) cluster based routing protocol in WSN, Please refer http://www.mathworks.in/matlabcentral/fileexchange/40115-low-energy-adaptive-clustering-hierarchy-protocol-leach
I think Abhijit has given two one of the best example to understand WSN in matlab. I am also adding two more links it will be very important to go through these links to take the most of advantage of the code,
Use Prowler toolbox (Probabilistic wireless network simulator). It is designed specifically for simulation of Wireless Sensor Networks using Matlab. A student of mine describes it in chapter 3 of her master thesis: http://www.diva-portal.org/smash/record.jsf?pid=diva2:645942
Thank you all too, as this information is very helpful to me too. Dear Mr. Osama Abd, can we co-ordinate with each other, as I presume that we both are doing on the same line. my e-mail is ([email protected])
you can start with the examples of matlab program itself. https://www.mathworks.com/matlabcentral/fileexchange/64600-wireless-sensor-network-deployment-using-matlab. this code may be useful for you.