MATLAB: How to select rows in an array based on the values in the first column of another array anotherarraycolumnfromrowselect Hi suppose I have a column of values like : How do I select rows in another array based on the array above, Example: row 46, 47 ,48, 49 …. except for row 52 Best Answer new_array = second_array(first_array,:) Related SolutionsMATLAB: How to select rows in an array based on the values in the first row of another array idx = setdiff(1:size(yourarray,1),yourvector)out = yourarray(idx,:) MATLAB: Selecting elements from an array idx = myArray( end, : ) < 0;negLastElementCols = myArray( :, idx );theRest = myArray( :, ~idx ); Related QuestionSelecting data in an array based on a logical value arrayHow to generate a matrix containing 35 rows and 3 columnsHow to filter out multiple rows based on another arrayHow to eliminate rows with NaN elementsSelecting first row in cell arrayCompare the rows of an array with another one’s arrayDeletion of first row in the matrix
Best Answer