vendredi 12 septembre 2014

Loops for 3d matrix


Vote count:

0




enter code hereHi every one!


enter code hereI have a matrix A with dimensional (45x500x5).


enter code hereI would like to use MATLAB loops to extract data from the matrix as follow in which enter code herethe first component are from 1 to 45; the third are from 1 to 5.


enter code heredata 1 = [A(1,:,1)] enter code heredata 2 = [A(2,:,1) A(1,:,2)]; enter code heredata 3 = [A(3,:,1) A(2,:,2)] A(1,:,3)]; enter code heredata 4 = [A(4,:,1) A(3,:,2)] A(2,:,3) A(1,:,4)]; enter code heredata 5 = [A(5,:,1) A(4,:,2)] A(3,:,3) A(2,:,4) A(1,:,5)]; enter code heredata 6 = [A(6,:,1) A(5,:,2)] A(4,:,3) A(3,:,4) A(2,:,5)]; enter code heredata 7 = [A(7,:,1) A(6,:,2)] A(5,:,3) A(4,:,4) A(3,:,5)];


and so on...


array 45 = [A(45,:,1) A(44,:,2)] A(43,:,3) A(42,:,4) A(41,:,5)];


I am very new in Matlab. Could anyone help to figure out the issue?


Thanks a lot.


Nhiu



asked 1 min ago







Loops for 3d matrix

Aucun commentaire:

Enregistrer un commentaire