Consider the presence of a three-dimensional matrix in the matrix, where
A(:,:,1) = [1 2 3;4 5 6;7 8 9]; A(:,:,2) = [11 22 33;44 55 66;77 88 99]; A(:,:,3) = [111 222 333;444 555 666;777 888 999];
Ok when i ask
A(1:end,1,:)
I get three different answers:
A(1:end,1,1) = [1 2 3]; A(1:end,1,2) = [11 22 33]; A(1:end,1,3) = [111 222 333];
I want to get this in one instruction, possibly without loops, etc .:
[1 2 3;11 22 33;111 222 333]
How to get it?
I want the new matrix not to be a series of vectors.
Thankyou.
source share