Create a Simple Scenario of WSNs
In the previous post, we have discussed about the various input parameters and their use to define a WSNs. Here, we will begin to design a simulation environment using the input parameters. First, we will see all four types of deployment scenarios in the consecutive posts. Random Distribution with Static Sensor and Static Anchor Deployment Scenario. clc clear all close all %% Deployment of the nodes and anchor nodes N=100; % Total Number of Sensors A=10; % Total Number of Anchors X=100; % Area length Y=100; % Area width R=20; % Transmission radius (m) [s_x,s_y, a_x a_y]=create_distribution(N,A,X,Y); plot(s_x,s_y,'bo'); % plot the sensor distribution hold on plot(a_x,a_y,'mo'); % plot the anchor distribution hold on grid on %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Create Distribution Function (Create a new file and paste the below code and saved the file as create_distribution.m) function[