Selecting multiple different rows in a 3D matrix
Mostrar comentarios más antiguos
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?
Respuestas (1)
James Tursa
el 6 de Dic. de 2021
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 comentarios
Tom Sagar
el 6 de Dic. de 2021
James Tursa
el 6 de Dic. de 2021
This?
x = matrix(:,:,4:12:76);
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!