필터 지우기
필터 지우기

I have an algorithm attached below and I have to write a matlab code from that algorithm. Can anyone please help me??

조회 수: 1 (최근 30일)
Define N global variable
Get N (total number of nodes in the network)
Get border_lines (Left_line, Right_line, Top_line, Bottom_line)
Divide_Network_to_Four_Zones (Zl, Zr,Zu, Zw)
for all zones i do
Nz[i] <- Get
Number_of_nodes_per_zone[i]
dz[i]^ Nz/N
if dz[i]>0.25 then
density_factor[i] <- High
else if 0.25 > density_factor[i] > 0.15
then
density_factor[i] <- Midium
else if 0.15 > density_factor[i]
density_factor[i] <- Low
end if
Broadcast density_factor[i]
if density_factor[i] <- High then
Devide_Zone_to_Four_Clusters[i]
for all Clusters j do
for all nodes k do
Node_Membership[i] [j] [k]
if No_Membership [j ] [i] [k] then
Delete_Cluster
end if
end for
end for
else if density_factor[i] <- Medium
then
Devide_Zone_to_Two_Clusters[i]
for all Clusters j do
for all nodes k do
Node_Membership[i] [j] [k]
if No_Membership[j][i][k] then
Delete_Cluster
end if
end for
end for
else if density_factor[i] <- Low then
Devide_Zone_to_One_Clusters[i]
for all Clusters j do
for all nodes k do
Node_Membership[j] [i] [k]
if No_Membership [j ] [i] [k] then
Delete_Cluster
end if
end for
end for
end if
end for
  댓글 수: 1
Ankit
Ankit 2019년 11월 19일
It is better to try yourself in MATLAB first and try to post the questions when you face problem. I would recommend you to first go through the MATLAB Onramp course.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 WSNs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by