This commit is contained in:
2023-05-21 19:13:18 +08:00
parent d5e7fdf687
commit db61a8b742
2 changed files with 28 additions and 24 deletions

View File

@ -3,19 +3,21 @@ 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)
cnt = np.zeros(600)
for t in range(0,600):
cnt[t] = t*0.2
vx = np.loadtxt("D:/wsf1x.csv",delimiter=",", dtype=float)
vy = np.loadtxt("D:/wsf1y.csv",delimiter=",", dtype=float)
vz = np.loadtxt("D:/wsf1z.csv",delimiter=",", dtype=float)
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.xlabel('时间')
plt.ylabel('每个时间段x方向位移')
plt.xlabel('时间 单位:秒')
plt.ylabel('z坐标 单位:米')
for i in range(0,35):
xt = np.zeros(500)
for j in range(0,500):
xt = np.zeros(600)
for j in range(0,600):
if(vz[i,j]) == 0 and vz[i,j-1]!=0:
vz[i,j] = vz[i,j-1]
xt[j] = vz[i,j]
plt.plot(cnt,xt)