【问题标题】:Sink Mobility in Wireless Sensor Network无线传感器网络中的接收器移动性
【发布时间】:2020-04-28 02:51:42
【问题描述】:
points = [200, 200;
          200, 180;
          180, 180;
          180, 200;
          40, 40;
          40, 160;
          160, 160;
          160, 40]
for s = 1 : size(points, 1)
  fprintf('Plotting (%d, %d)\n', points(s,1), points(s, 2));
  pause(5);

我以这种方式完成了我的代码......我想让接收器/基站的位置移动,以便它以一定的速度移动......我做得对吗?因为我认为它只会考虑最后一个值并且不会更新实时值? 有什么建议??? 结束

【问题讨论】:

  • 水槽必须以一定的速度移动。无论是移入还是移出(100*100m)网格。

标签: matlab performance networking communication wireless


【解决方案1】:

您可以确定 x 轴和 y 轴(vxvy)的速度,然后通过 x = v*t + x0y = v*t + y0 等式生成移动设备的位置(xy),其中 t是时间,x0y0 是初始位置。

x0 = 0; % Start Point
y0 = 0; % Start Point
t=1:0.1:100
vx = 1; % initial velocity 
vy = 1; % initial velocity 
x = vx.*t + x0;
y = vy.*t + y0;

【讨论】:

    猜你喜欢
    • 2011-01-17
    • 1970-01-01
    • 1970-01-01
    • 2021-07-18
    • 2011-05-30
    • 2012-02-25
    • 2013-07-30
    • 1970-01-01
    • 2015-12-12
    相关资源
    最近更新 更多