22 lines
602 B
Python
22 lines
602 B
Python
|
|
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()
|