def myfuncx try data = nploadtxtdatatxt delimiter= except IOError as error printError cant read the file Details error x_data = data 1reshape-1 1 # 转换为列向量 y_data = data 0re
可以使用matplotlib库来作出函数图,代码如下:
import matplotlib.pyplot as plt
x = np.arange(0, 4095) y = myfunc(x)
plt.plot(x, y) plt.xlabel('x') plt.ylabel('y') plt.title('Function Graph') plt.show()
原文地址: https://www.cveoy.top/t/topic/hue6 著作权归作者所有。请勿转载和采集!