extracting 2D array from 4D array in matlab -


this question has answer here:

i have 4d array in matlab this,

test(:,:,1,1) =       0   test(:,:,2,1) =       0   test(:,:,3,1) =       0   test(:,:,4,1) =       0   test(:,:,5,1) =       0   test(:,:,1,2) =       0   test(:,:,2,2) =       0   test(:,:,3,2) =       0   test(:,:,4,2) =       0   test(:,:,5,2) =       0   test(:,:,1,3) =       0   test(:,:,2,3) =       0   test(:,:,3,3) =       0   test(:,:,4,3) =       0   test(:,:,5,3) =       0   test(:,:,1,4) =       0   test(:,:,2,4) =       0   test(:,:,3,4) =       0   test(:,:,4,4) =       0   test(:,:,5,4) =       0   test(:,:,1,5) =       0   test(:,:,2,5) =       0   test(:,:,3,5) =       0   test(:,:,4,5) =       0   test(:,:,5,5) =       0  k>> test  test(:,:,1,1) =       0   test(:,:,2,1) =       0   test(:,:,3,1) =       0   test(:,:,4,1) =       0   test(:,:,5,1) =       0   test(:,:,1,2) =       0   test(:,:,2,2) =       0   test(:,:,3,2) =       0   test(:,:,4,2) =       0   test(:,:,5,2) =       0   test(:,:,1,3) =       0   test(:,:,2,3) =       0   test(:,:,3,3) =       0   test(:,:,4,3) =       0   test(:,:,5,3) =       0   test(:,:,1,4) =       0   test(:,:,2,4) =       0   test(:,:,3,4) =       0   test(:,:,4,4) =       0   test(:,:,5,4) =       0   test(:,:,1,5) =       0   test(:,:,2,5) =       0   test(:,:,3,5) =       0   test(:,:,4,5) =       0   test(:,:,5,5) =       0 

now want array, this

ans =       0     0     0     0      0     0     0     0      0     0     0     0      0     0     0     0      0     0     0     0 

is there simple way convert dimentions. new multidimensional arrays in matlab. please let me know if knows of solution.

use squeeze function, return matrix of size [5 4] when input matrix of size [1 1 5 4]


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -