Hello,
I have a large 3D array Q (17019x68x50).
I'd like to create a new 2D matrix modeQ which is 68x50 (i.e. the latter two dimesions), with the values being the modes of each corresponding column in the array.
I'm interested only in non-zero modes, but other values are much less frequent than zero, so mode(Q,1) throws out a matrix of only zeroes.
I do not understand the nonzeros function enough to utilise it correctly either.
1 Comment
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/493198-creating-a-2d-matrix-of-non-zero-modes-from-a-3d-array#comment_771452
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/493198-creating-a-2d-matrix-of-non-zero-modes-from-a-3d-array#comment_771452
Sign in to comment.