test_dataset.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:prototype 作者: chutsu 项目源码 文件源码
def test_step(self):
        # Step
        a_B_history = self.dataset.a_B
        w_B_history = self.dataset.w_B

        for i in range(30):
            (a_B, w_B) = self.dataset.step()
            a_B_history = np.hstack((a_B_history, a_B))
            w_B_history = np.hstack((w_B_history, w_B))

        # Plot
        debug = False
        # debug = True
        if debug:
            plt.subplot(211)
            plt.plot(self.dataset.time_true, a_B_history[0, :], label="ax")
            plt.plot(self.dataset.time_true, a_B_history[1, :], label="ay")
            plt.plot(self.dataset.time_true, a_B_history[2, :], label="az")
            plt.legend(loc=0)

            plt.subplot(212)
            plt.plot(self.dataset.time_true, w_B_history[0, :], label="wx")
            plt.plot(self.dataset.time_true, w_B_history[1, :], label="wy")
            plt.plot(self.dataset.time_true, w_B_history[2, :], label="wz")
            plt.legend(loc=0)
            plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号