Selecting a subset of a larger matrix with criteria
이전 댓글 표시
Hi,
I have a matrix that is Nrows x 150000 that includes a small number values that are less than or equal to -1. I would like to create a smaller Nrows x 100000 matrix that only includes values greater than -1 using a random subset of the remaining values in the larger matrix. It could also be the first 100000 values in each row that fit the criteria, but it cannot be, for example, the largest 100000 values, as this would introduce bias. Therefore, I have not been able to figure this it out by sorting the values. It is also complicated by the fact that each row has a different number of values that are <=-1, so I can't simply drop those values; it would create a matrix with different numbers of columns.
Please help! And thank you in advance. Noah
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Gravitation, Cosmology & Astrophysics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!