ndimgrid(bounds,ste​ps)

版本 1.2.0.0 (1.1 KB) 作者: Rod
Returns a matrix of points in n-dimensional space comprising a grid
22.0 次下载
更新时间 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 CenterMATLAB Answers 中查找有关 Linear 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