how can calcuate the energy consumption of wsn????????????!!!!!!!!!!!!!!
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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)
Risposte (1)
iram fatima
il 8 Mag 2020
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 Commento
Walter Roberson
il 9 Mag 2020
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 ?
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!