本文整理汇总了Python中Channel.r方法的典型用法代码示例。如果您正苦于以下问题:Python Channel.r方法的具体用法?Python Channel.r怎么用?Python Channel.r使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel.r方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: import Channel [as 别名]
# 或者: from Channel import r [as 别名]
NU = np.zeros(int((T - t0) / h) + 1)
L = np.zeros(int((T - t0) / h) + 1)
D = np.zeros(int((T - t0) / h) + 1)
R = np.zeros(int((T - t0) / h) + 1)
Xtg = np.zeros((int((T - t0) / h) + 1,2))
U = np.zeros(int((T - t0) / h) + 1)
i = 0
for s in np.arange(t0, 1 + 1e-10,h / T):
Xtg[i] = target.Xp(s)
x = [x_plot[i], y_plot[i]]
NU[i] = target.nu(s, x)
D[i] = target.d(s, x)
L[i] = channel.l(x)
R[i] = channel.r(x)
U[i] = uav.u(s, x)
i = i + 1
ax1.scatter(Xbs[0],Xbs[1], marker = 'v', color = 'blue')
ax1.plot(Xtg[:,0],Xtg[:,1], marker = 'x', color = 'red')
ax1.scatter(XT[0],XT[1], marker = 'x', color = 'green')
ax1.plot(X[:,0],X[:,1], color = 'blue', linewidth = 2.0, alpha = 0.3)
ax1.plot(x_plot, y_plot, color = 'red')
ax1.set_aspect('equal')
ax2.plot(t, NU, color = 'blue', label = 'surv quality')
ax2.plot(t, L, color = 'green', label = 'transfer quality')
ax2.legend()