meshgrid:指“网格化坐标/网格点阵”,常见于数值计算与可视化(如 MATLAB、NumPy)。它把一维坐标向量扩展成二维(或更高维)的坐标矩阵,用于生成曲面、等高线、矢量场等图形或进行逐点计算。
/ˈmɛʃɡrɪd/
Use meshgrid to create X and Y coordinates for a surface plot.
用 meshgrid 生成曲面图所需的 X、Y 坐标。
After generating X, Y = meshgrid(x, y), we evaluated the function on every grid point to compute a contour map of the field.
在生成 X, Y = meshgrid(x, y) 之后,我们在每个网格点上计算函数值,从而得到该场的等高线图。
由 mesh(网状结构、网格)+ grid(栅格、坐标格网)组合而成,字面意思是“网状格子”。在编程语境中,它进一步特指“把坐标线织成坐标网”的操作/函数名。
meshgrid 作为基础函数用于生成 2-D/3-D 网格坐标。 numpy.meshgrid 用于坐标矩阵生成与广播计算。