MATLAB: I have a matrix of 5 rows and 3 columns and i want to select only 1st 3rd and 4th row with all column using an array how to do it?whats the script

arrayMATLABmatrixmatrix array

[1 2 3] [4 5 6] [7 8 9] [10 11 12] [13 14 15]

Best Answer

myArray = [1 2 3; 4 5 6; 7 8 9; 10 11 12; 13 14 15];
result = myArray( [1 3 4], : );