Selecting multiple different rows in a 3D matrix
8 次查看(过去 30 天)
显示 更早的评论
I have a 3D matrix.
30x17x456
I'd like to select all 1st and 2nd dimention but only perticular rows in 3rd dimention.... for example
x = matrix(:,:,2:16:24:48);
This doesnt work, would i have to select each row out the matrix indavidually?
0 个评论
回答(1 个)
James Tursa
2021-12-6
You can use a vector for the indexing. E.g.,
x = matrix(:,:,[2:16,24:48]);
Does that, or something like that, do what you want?
2 个评论
另请参阅
类别
在 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!