How do i extract data from 3D matrix?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Prakash Raut
el 22 de Nov. de 2021
Respondida: Voss
el 23 de Nov. de 2021
I have a matrix of size 256*256*256, i want to create a 2D matrix whose each row has information from the z direction of the original matrix, how do i do it?
2 comentarios
James Tursa
el 22 de Nov. de 2021
Editada: James Tursa
el 22 de Nov. de 2021
Please give us a small example of what you want. E.g., start with a 2x2x2 array and then show us the resulting 2x2 matrix you want as an output. Maybe all you need is sum(matrix,3) or mean(matrix,3), but we can't tell from what you have written so far.
Respuesta aceptada
Voss
el 23 de Nov. de 2021
[m,n,~] = size(A);
newA = reshape(permute(A,[2 1 3]),m*n,[]).';
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!