ndimgrid(bounds,ste​ps)

バージョン 1.2.0.0 (1.09 KB) 作成者: Rod
Returns a matrix of points in n-dimensional space comprising a grid
ダウンロード: 22
更新 2016/2/17

ライセンスの表示

Similar to the meshgrid() function, this script will return a matrix where each row is a point in n-dimensional space.
Bounds specifies the limits of the grid in each dimension, steps specifies the number of points in each dimension.
example:
bounds = [1, 1; 5,5];
steps = [5 , 5];
Grid = ndimgrid(bounds,steps);

Grid =

1 1
2 1
3 1
4 1
5 1
1 2
2 2
3 2
4 2
5 2
1 3
2 3
3 3
4 3
5 3
1 4
2 4
3 4
4 4
5 4
1 5
2 5
3 5
4 5
5 5

Hope this helps someone else

引用

Rod (2024). ndimgrid(bounds,steps) (https://www.mathworks.com/matlabcentral/fileexchange/55464-ndimgrid-bounds-steps), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2015a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLinear Algebra についてさらに検索
タグ タグを追加

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.2.0.0

Changed ordering of grid

1.1.0.0

changed ordering of bounds

1.0.0.0