Accessing a cell in a 2D grid
5 次查看(过去 30 天)
显示 更早的评论
Hi all,
I have a 2D grid as shown below where each cell represents a pair of
and
where
and
. I would like to construct a new index that combines these two indices to run over all of the cells as a one continous number.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/673598/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/673603/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/673608/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/673613/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/673618/image.png)
Any help would be appreciated.
Thanks.
0 个评论
回答(1 个)
Cris LaPierre
2021-7-3
6 个评论
dpb
2021-7-4
Yet again, however, I'd almost wager it isn't the most fruitful approach to the problem...
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!