Selecting multiple different rows in a 3D matrix
조회 수: 2 (최근 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에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!