赞
踩
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy import interpolate
import matplotlib as mpl
mpl.rcParams[“font.sans-serif”] = [“SimHei”]
mpl.rcParams[“axes.unicode_minus”] = False
file = pd.read_excel(‘Three moment method.xlsx’,header=None,names=[‘x’, ‘value’])
data = pd.DataFrame(file)
x = data[‘x’] # Take the first column of data
y = data[‘value’] # Take the second column of data
tck = interpolate.splrep(x, y) #(t,c,k)包含节点向量、B样条曲线系数和样条曲线阶数的元组。
xx = np.linspace(min(x), max(x), 200)
yy = interpolate.splev(xx, tck, der=0)
x1,x2=
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。