MATLAB: Select rows and columns select Hello, In attachment my dataset. I have to select the 3 first columns and the 8 first rows, all the data in it. How do I do this? Best Answer A(1:8,1:3)ExampleA=randi(9,10,5)out=A(1:8,1:3)Read this http://www.mathworks.com/help/matlab/learn_matlab/array-indexing.html Related SolutionsMATLAB: Selecting rows from column vectors mpw.hid=='103'With strcmp(mpw.hid,'103') 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 myArray = [1 2 3; 4 5 6; 7 8 9; 10 11 12; 13 14 15];result = myArray( [1 3 4], : ); Related QuestionHow to delete rows from a matrix when the values of certain columns are equalSelecting unique rowsHow to add a row and column to a matrixSelecting even rowsMatrix dataSelecting certain rowsHow to assign part of a matrix to be a variable
Best Answer