Skip to content


The instruction is valid for Matlab version R2007b.
First dowload and save grTheory toolobox (save it in Tools): Open the Matlab and go to the File/Set Path and click on the Add Folder. Insert the path to your grTheory toolbox. 

Next create working folder and store there all files prepared at the bottom of this webpage (networksDB.mat, loadAndPrintNet.m, oneRoundWSN.m).

The networkDb.mat file that contains the database of the WSN networks in the form of Matlab matrixes with the node’s X,Y coordinates.

The function “loadAndPrintNet(numberOfNodes, nodeDegree) loads a selected ad-hoc network model from the networkDB.mat structure and displays its layout into the Matlab figure. User can choose 50, 100 or 400 number of nodes and degree of node 8, 10, 12, 14, 16, 18, 20, 22, 24, 26. Database is suitable for algorithms investigation under the same network conditions. You can find more details in the file comments. You can view the printed layout in the Matlab figure window.

To simulate the energy consumption of one round of data gathering from all the nodes, download oneRoundWSN.m and follow the comments within this file.


1 thought on “MATLAB : WSN SIMULATION”

  1. I don’t even know how I ended up here, but
    I thought this post was great. I do not know who you are but definitely you’re
    going to a famous blogger if you aren’t already 😉 Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *