How to deploy sensor nodes in wireless sensor network (3D)

버전 1.0.0 (2.05 KB) 작성자: Junaid Qadir
This is a short and simple MATLAB code for deploying the sensor nodes in wireless sensor networks.
다운로드 수: 151
업데이트 날짜: 2021/9/21

라이선스 보기

% Author: Junaid Qadir (DITEN, UniGe, Italy)
% Department of Electrical, Electronic and Telecommunications Engineering, and Naval Architecture (DITEN)
% University of Genova, Genova, Italy
% Website: https://junaidqadirqau.wixsite.com/junaid
% Email: jqadar@ele.qau.edu.pk // junaid.qadir@edu.unige.it // junaidqadiqau@gmail.com
% Reference: J. Qadir, U. Ullah, B. Sainz-De-Abajo, B. G. Zapirain, G. Marques and I. de la Torre Diez,
%"Energy-Aware and Reliability-Based Localization-Free Cooperative Acoustic Wireless Sensor Networks,"
%in IEEE Access, vol. 8, pp. 121366-121384, 2020, doi: 10.1109/ACCESS.2020.3006194.
clc % clear command window
close all % close other window
clear all % clear variables
total_number_of_sensor_node=50; % The total number of sensor nodes in the network
x=randi([0,50],1,total_number_of_sensor_node); % x coordinate of each sensor node in the network
y=randi([0,50],1,total_number_of_sensor_node); % y coordinate of each sensor node in the network
z=randi([0,50],1,total_number_of_sensor_node); % z coordinate of each sensor node in the network
plot3(x,y,z,'mo',... % Plot all the nodes in 3 dimension
'LineWidth',1.5,... % Size of the line
'MarkerEdgeColor','k',... % The color of the outer surface of the node. Currently it is set to black color. "k" stand for black.
'MarkerFaceColor',[1 1 0],... % The color of the inside of the node. Currently it is set to yellow color. "[1 1 0]" is a code of yellow color
'MarkerSize',10)
box on
xlabel(' Length (m)') % X-label of the output plot
ylabel(' Width (m)') % Y-label of the output plot
zlabel(' Height (m)') % Z-label of the output plot
title(' Random deployment of the sensor nodes in the network') % Title of the plot
grid on % Activate the grid in background of the plot
% Hold figure 1
hold on
%Note: To change the color, just write "r" for red, "g" for green, "b" for %blue, "m" for magenta, "c" for cyan and so on

인용 양식

Junaid Qadir (2024). How to deploy sensor nodes in wireless sensor network (3D) (https://www.mathworks.com/matlabcentral/fileexchange/99609-how-to-deploy-sensor-nodes-in-wireless-sensor-network-3d), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2021a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0