MATLAB: Matrix question

matrix

Q =
10 20 30 40 50 60 70
8 9 10 11 12 13 14
33 30 27 24 21 18 15
28 35 42 49 56 63 70
36 45 54 63 72 81 90
-1 -2 -3 -4 -5 -6 -7
64 69 74 79 84 89 94
required to find:
T=
64 79 94
28 49 70
10 40 70
I used syntax Q([7:21:49; 4:21:49; 16:6:49;])
but it doesn't work. I can only get
64 79 94
28 49 70
using Q([7:21:49; 4:21:49]) and it doesn't accept Q([7:21:49; 4:21:49; 16:6:49;])… any ideas?

Best Answer

Q =[10 20 30 40 50 60 70
8 9 10 11 12 13 14
33 30 27 24 21 18 15
28 35 42 49 56 63 70
36 45 54 63 72 81 90
-1 -2 -3 -4 -5 -6 -7
64 69 74 79 84 89 94]
Q(7:-3:1,1:3:7)