2维C网格在Python中直观展示

 

Chebyshev grid
1 import numpy as np
2 import matplotlib.pyplot as plt
3 N = 30
4 M = 15
5 x = np.cos (np.pi * np.arange(N + 1) / N)
6 y = np.cos (np.pi * np.arange(M + 1) / M)
7 xx, yy = np.meshgrid(x, y)
8 plt.plot(xx, yy, "ko", markersize = 3)
9 plt.show()

2维C网格在Python中直观展示

代码来源:

interpolation - chebyshev nodes on a 2D grid - Mathematics Stack Exchange

上一篇:java 蓝桥杯 Huffuman树


下一篇:Linux系统中设置开机自动运行脚本程序