楼主: xuning5176
3469 0

[程序分享] ndgrid 和 meshgrid [推广有奖]

  • 11关注
  • 9粉丝

已卖:779份资源

讲师

87%

还不是VIP/贵宾

-

威望
0
论坛币
3812 个
通用积分
15.5361
学术水平
5 点
热心指数
3 点
信用等级
2 点
经验
4031 点
帖子
212
精华
0
在线时间
802 小时
注册时间
2009-10-13
最后登录
2025-5-28

楼主
xuning5176 发表于 2013-4-5 14:59:36 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
NDGRID Generation of arrays for N-D functions and interpolation.
    [X1,X2,X3,...] = NDGRID(x1,x2,x3,...) transforms the domain
    specified by vectors x1,x2,x3, etc. into arrays X1,X2,X3, etc. that
    can be used for the evaluation of functions of N variables and N-D
    interpolation.  The i-th dimension of the output array Xi are copies
    of elements of the vector xi.

MESHGRID   X and Y arrays for 3-D plots.
    [X,Y] = MESHGRID(x,y) transforms the domain specified by vectors
    x and y into arrays X and Y that can be used for the evaluation
    of functions of two variables and 3-D surface plots.
    The rows of the output array X are copies of the vector x and
    the columns of the output array Y are copies of the vector y.

    [X,Y] = MESHGRID(x) is an abbreviation for [X,Y] = MESHGRID(x,x).
    [X,Y,Z] = MESHGRID(x,y,z) produces 3-D arrays that can be used to
    evaluate functions of three variables and 3-D volumetric plots.

    For example, to evaluate the function  x*exp(-x^2-y^2) over the
    range  -2 < x < 2,  -2 < y < 2,

        [X,Y] = meshgrid(-2:.2:2, -2:.2:2);
        Z = X .* exp(-X.^2 - Y.^2);
        mesh(Z)

    MESHGRID is like NDGRID except that the order of the first two input
    and output arguments are switched (i.e., [X,Y,Z] = MESHGRID(x,y,z)
    produces the same result as [Y,X,Z] = NDGRID(y,x,z)).  Because of
    this, MESHGRID is better suited to problems in cartesian space,
    while NDGRID is better suited to N-D problems that aren't spatially
    based.  MESHGRID is also limited to 2-D or 3-D.

好像差别不大


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:grid MESH GRI mes Evaluation arrays specified elements

金融爱好者。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 22:09