how can calcuate the energy consumption of wsn????????????!!!!!!!!!!!!!!
조회 수: 5 (최근 30일)
이전 댓글 표시
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
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
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 ?
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!