how can calcuate the energy consumption of wsn???????​?????!!!!!​!!!!!!!!!

2 ビュー (過去 30 日間)
ali hadjer
ali hadjer 2015 年 12 月 1 日
コメント済み: Walter Roberson 2020 年 5 月 9 日
hello
i implement a wsn in matlab and i want to calculate the energy of transmission and reception of sensor node
how can i do
net = [1:n;rand([1,n])*x;rand([1,n])*y];
net1 = net;
hold on;
plot(net(2,:),net(3,:),'bo','MarkerSize',5,'MarkerFaceColor','b');
plot(S.X,S.Y,'or','MarkerSize',10,'MarkerFaceColor','r');
grid on
title('\color[rgb]{0 .5 .5}Déploiement de réseau de capteur sans fil', 'FontSize', 12);
xlabel('Longeur \rm [m] \rightarrow', 'FontSize', 12);
ylabel(' Largeur \rm [m] \rightarrow','FontSize', 12);
v = net(1,:)';
s = int2str(v);
text(net(2,:)+1,net(3,:)+1,s,'FontSize',8,'VerticalAlignment','Baseline');
text(S.X+1,S.Y+1,'sink','FontWeight','bold','FontSize',10,'color','k','VerticalAlignment','Baseline','FontName','Cambria');
%%%%%%%%%%%%%%%%%%%%%%%%%%Densite%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
densite=n/10000;%densite=(n*pi*R^2)/10000; %densite de reseau
set(handles.edit5, 'string',densite );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Energie total de reseau%%%%%%%%%%%%%ù
Eo=1;
E_totale=n*Eo;
E=num2str(E_totale)

回答 (1 件)

iram fatima
iram fatima 2020 年 5 月 8 日
net = [1:n;rand([1,n])*x;rand([1,n])*y];
net1 = net;
hold on;
plot(net(2,:),net(3,:),'bo','MarkerSize',5,'MarkerFaceColor','b');
plot(S.X,S.Y,'or','MarkerSize',10,'MarkerFaceColor','r');
grid on
title('\color[rgb]{0 .5 .5}Déploiement de réseau de capteur sans fil', 'FontSize', 12);
xlabel('Longeur \rm [m] \rightarrow', 'FontSize', 12);
ylabel(' Largeur \rm [m] \rightarrow','FontSize', 12);
v = net(1,:)';
s = int2str(v);
text(net(2,:)+1,net(3,:)+1,s,'FontSize',8,'VerticalAlignment','Baseline');
text(S.X+1,S.Y+1,'sink','FontWeight','bold','FontSize',10,'color','k','VerticalAlignment','Baseline','FontName','Cambria');
%%%%%%%%%%%%%%%%%%%%%%%%%%Densite%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
densite=n/10000;%densite=(n*pi*R^2)/10000; %densite de reseau
set(handles.edit5, 'string',densite );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Energie total de reseau%%%%%%%%%%%%%ù
Eo=1;
E_totale=n*Eo;
E=num2str(E_totale)
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 5 月 9 日
This is exactly the same as the user code, except that it leaves out an empty line that the user had. It is not clear how this is an answer to the question ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWSNs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by