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.


Posted: 2017/11/13

23 thoughts 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!

  2. Hello! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My website looks weird when viewing from my iphone4. I’m trying to find a theme or plugin that might be able to fix this problem. If you have any suggestions, please share. Appreciate it!

  3. The crux of your writing whilst appearing agreeable originally, did not really sit perfectly with me after some time. Someplace throughout the sentences you were able to make me a believer unfortunately just for a while. I nevertheless have a problem with your jumps in assumptions and one would do nicely to help fill in those breaks. In the event you can accomplish that, I could certainly be impressed.

  4. Terrific work! This is the type of info that should be shared around the net. Shame on the search engines for not positioning this post higher! Come on over and visit my site . Thanks =)

  5. Magnificent beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog web site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear concept

  6. It’s a pity you don’t have a donate button! I’d most certainly donate to this excellent blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to new updates and will share this blog with my Facebook group. Talk soon!

  7. Undeniably imagine that which you stated. Your favourite reason appeared to be on the net the simplest factor to be aware of. I say to you, I certainly get irked while other folks consider issues that they just do not recognise about. You managed to hit the nail upon the highest and defined out the whole thing with no need side-effects , people can take a signal. Will probably be again to get more. Thank you

    1. User Avatar

      I’m not working on that project anymore. I wrote this article in 2017, 5 years ago. Please try it yourself first. If you get stuck, you can come back here. I’ll do what I can to help. 🙂

  8. Hey There. I discovered your blog the usage of msn. This is a really well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.

  9. I believe everything posted made a lot of sense. However, what about this? suppose you added a little content? I mean, I don’t want to tell you how to run your website, however what if you added a post title that grabbed folk’s attention? I mean BLOG_TITLE is kinda boring. You might look at Yahoo’s home page and see how they write post titles to get people interested. You might add a related video or a pic or two to get people interested about what you’ve written. In my opinion, it might make your posts a little bit more interesting.

Leave a Reply

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