奧推網

選單
文化

[X,Y] = meshgrid(x,y)的說明

[X,Y] = meshgrid(x,y) returns 2-D grid coordinates based on the coordinates contained in vectors x and y。 X is a matrix where each row is a copy of x, and Y is a matrix where each column is a copy of y。 The grid represented by the coordinates X and Y has length(y) rows and length(x) columns。

[X,Y] = meshgrid(x,y)基於向量x和y中包含的座標返回2-D網格座標。 X是矩陣,其中每行是x的副本,Y是矩陣,其中每列是y的副本。由座標X和Y表示的網格具有長度(y)行和長度(x)列。例如:x = [ 1 2 3] y = [ 4 5 ] 其中x ,y均為行向量。[X,Y] = meshgrid(x,y)矩陣X的每一行都是x,一共有length(y)行即:X= 1 2 312 3矩陣y的每一列都是y,一共有length(x)行即:Y=44 455 5