This commit is contained in:
2023-05-09 22:23:09 +08:00
parent 28ef3dbf6a
commit d5e7fdf687
8 changed files with 743 additions and 0 deletions

22
c_cpp/draw.py Normal file
View File

@ -0,0 +1,22 @@
import numpy as np
import random
import math
import numpy as np
import matplotlib.pyplot as plt
cnt = np.zeros(500)
for t in range(0,500):
cnt[t] = t
xt = np.zeros(500)
vx = np.loadtxt("D:/speed1x.csv",delimiter=",", dtype=float)
vy = np.loadtxt("D:/speed1y.csv",delimiter=",", dtype=float)
vz = np.loadtxt("D:/speed1z.csv",delimiter=",", dtype=float)
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.xlabel('时间')
plt.ylabel('每个时间段x方向位移')
for i in range(0,35):
xt = np.zeros(500)
for j in range(0,500):
xt[j] = vz[i,j]
plt.plot(cnt,xt)
plt.show()