Effacer les filtres
Effacer les filtres

I have used the following code to create a wsn structure with 4*4 cell grids and have deployed randomly 100 nodes in it.Now i have to give energy to all the nodes nearly 0.5 joules. How to do it? Please help

1 vue (au cours des 30 derniers jours)
I have used the following code to create a wsn structure with 4*4 cell grids and have deployed randomly 100 nodes in it.Now i have to give energy to all the nodes nearly 0.5 joules. How to do it? Please help.
NrGrid = 4; % Number Of Grids
x = linspace(0, 100, NrGrid+1);
[X,Y] = meshgrid(x);
figure(1)
plot(X,Y,'k')
hold on
plot(Y,X,'k')
hold off
set(gca, 'Box','off', 'XTick',[], 'YTick',[])
axis square
NrGrid = 4;
coords = rand(100,2) * maNrGrid + 1;
scatter(coords(:,1),coords(:,2));
set(gca, 'XTick', 1:maNrGrid+1, 'YTick', 1:maNrGrid+1)
grid on

Réponse acceptée

Walter Roberson
Walter Roberson le 12 Juin 2015
energy(1:100) = sqrt(7) /2E7;
In units of kilowatt-hours, that is just under half a joule.

Plus de réponses (0)

Catégories

En savoir plus sur WSNs dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by