Post a New Reply
Reply to thread: sample code for creating a node in wireless sensor network using matlab pdf
Username:
Post Subject:
Post Icon:
Your Message:
Post Options:
Thread Subscription:
Specify the type of notification and thread subscription you'd like to have to this thread. (Registered users only)






Thread Review (Newest First)
Posted by amit12 - 10-04-2017, 08:41 PM
Hi i am Deepa i would like to get a sample matlab code for deploying nodes in wireless sensor network.
Posted by AKS_DX - 10-04-2017, 08:41 PM
The instruction is valid for Matlab version R2007b

First dowload and save grTheory toolobox (save it in Tools): http://mathworksmatlabcentral/fileexchange/4266. 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.
Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.