Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português -

Please note that the recommended version of Scilab is 6.0.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > elementarymatrices > meshgrid

meshgrid

行列または3次元配列を作成

呼び出し手順

[X, Y] = meshgrid(x)
[X, Y] = meshgrid(x,y)
[X, Y, Z] = meshgrid(x,y,z)

パラメータ

x, y, z

ベクトル

X, Y, Z

入力引数が2個の場合は行列, 入力引数が3個の場合は3次元配列

説明

行列または3次元配列を作成します.

x = -1:0.1:1;
y = -1:0.1:1;

[X,Y] = meshgrid(x,y);

for i=1:size(X,1)
  for j=1:size(X,2)
    Z(i,j) = sinc(2*%pi*X(i,j)*Y(i,j));
  end
end

surf(X,Y,Z)

参照

  • ndgrid — 多次元関数評価用グリッドの配列

作者

Farid Belahcene

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Mar 03 11:00:51 CET 2011