I want to extract part of a matrix based on condition imposed on elements of first column. For example, I have a matrix A=[10, 1,2,3; 15,2,4,6;20,3,6,9;25,4,8,12;30,5,10,15;35,6,12,18]; I want to extract columns 2 to end where elements of first column must lie between 15 and 30 inclusive. My results should be [2,4,6; 3,6 ,9; 4,8,12; 5 , 10,15]; In my real world application, I have a matrix of size 10000 by 30. Any help form kind-hearted people is much appreciated. Thank you in advance for your time.
MATLAB: Getting parts of Matrix based on condition imposed on elements of first column
extract parts of matrix
Related Question
- Extracting rows based based on criteria from two columns
- Repeating blocks of N rows M times
- Summation of rows , then columns in matrix
- How to repeat different numbers in a row
- How to re-assign index values for a matrix
- How to reshape a 2D to 3D matrix without using loops (reshape) and keeping a particular order of the elements// Wrong arragement of elemts after using “reshape”
Best Answer