Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i plot node without redundant node !?

2 ビュー (過去 30 日間)
ali hadjer
ali hadjer 2015 年 11 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
hello how can i plot node without redundant node :
  1. i suppose that node u wil redundant if dist(u,v)< r(range of sensor)
  2. degree of node is the number of neighbor(redundant node whos include in range of sensor r)where dist(u,v)< rmy code :
degree=[];
if isfield(handles,'net')
for i = 1:numel(handles.net(1,:))
degree(i)=0;
for j = 1:numel(handles.net(1,:))
X1 = handles.net(2,i);
Y1 = handles.net(3,i);
X2 = handles.net(2,j);
Y2 = handles.net(3,j);
xSide = abs(X2-X1);
ySide = abs(Y2-Y1);
d = sqrt(xSide^2+ySide^2);% distance euclidienne
%DD(i,j)=d %matrice de distance entre noeuds
%disp(DD);
%RESORTIR LES NOEUD REDONDANTS
if (d<(handles.r))&&(i~=j)% <2r %2*
degree(i)=degree(i)+1;% CALCULE LEs nombre de neighbord( DEGRE) DES NOEUDS REDONDANTS
disp(degree(i))
%plot([X1,X2],[Y1,Y2],'o','LineWidth',0.1);
% hold on;
%for i = 1:numel(handles.net(1,:))
% for j = 1:numel(handles.net(1,:))
% if (d<=2*(handles.r))&&(i~=j)
if (max(degree))&&(min(handles.d_sink))
plot([X1,X2],[Y1,Y2],'o','LineWidth',0.1);
grid on;
end
end
end
% end
%end
%end
end
end
  2 件のコメント
per isakson
per isakson 2015 年 11 月 8 日
I did the markup

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by