- 2024-10-29ex7_4 机床加工
程序文件ex7_4.pyimportnumpyasnpfromscipy.interpolateimportinterp1dfromscipy.interpolateimportlagrangeimportpylabasplta=np.loadtxt('data7_4.txt')x0=a[0];y0=a[1]x=np.linspace(0,15,151)yx1=interp1d(x0,y0)#分段线性插值y1=y
- 2024-10-29ex7_3
程序文件ex7_3.pyimportnumpyasnpimportpylabaspltfromscipy.interpolateimportlagrangeyx=lambdax:1/(1+x**2)deffun(n):x=np.linspace(-5,5,n+1)p=lagrange(x,yx(x))#n次插值多项式returnpx0=np.linspace(-5,5,100)plt.rc('text',u
- 2024-06-24EX7
TASK1#include<stdio.h>#include<Stdlib.h>#defineN80#defineM100typedefstruct{charname[N];charauthor[M];}Book;voidfunc1();voidfunc2();intmain(){func1();func2();system("pause");return0;