MATLAB: What does M([1:1 2:3], [1:0 2:3]) mean

MATLABmatrix array

Hi,
Using a square matrix as an example:
>> M = [1 2 3; 4 5 6; 7 8 9]
M =
1 2 3
4 5 6
7 8 9
I don't understand what does M([1:1 2:3], [1:0 2:3]) do to give the following answer?
>> select = M([1:1 2:3], [1:0 2:3])
select =
2 3
5 6
8 9

Best Answer

This
select = M([1:1 2:3], [1:0 2:3])
is awfully written, it means
select = M(1:3, [2 3])
select is the lines 1 to 3 of M and colum 2 and 3
Related Question