美文网首页
[X,Y] = meshgrid(x,y)的说明

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

作者: 春二一 | 来源:发表于2019-07-07 21:13 被阅读0次

    [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 3
    1 2 3
    矩阵y的每一列都是y,一共有length(x)行
    即:
    Y =
    4 4 4
    5 5 5

    相关文章

      网友评论

          本文标题:[X,Y] = meshgrid(x,y)的说明

          本文链接:https://www.haomeiwen.com/subject/jjiihctx.html