Remove column based on row value
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello all,
A bit new to MATLAB but I have a matrix M that is [2x19]. In the first row are x-values derived from another function, but I want to return a new matrix that excludes the columns in M with an x-value larger than 4 in this case
100 0.909090909090909 1 1.01010101010101 1.13636363636364 1.29870129870130 1.50000000000000 1.51515151515152 1.81818181818182 2 2.27272727272727 2.50000000000000 3 3.03030303030303 3.50000000000000 4 4.50000000000000 4.54545454545455 5
18 1 0.909090909090909 0.900000000000000 0.800000000000000 0.700000000000000 0.606060606060606 0.600000000000000 0.500000000000000 0.454545454545455 0.400000000000000 0.363636363636364 0.303030303030303 0.300000000000000 0.259740259740260 0.227272727272727 0.202020202020202 0.200000000000000 0.181818181818182
I know it might seem like a simple question but I can't seem to use the M = M(M(1,:)<=4, M(:,1) nonmenclature correctly. Would appreciate any help
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!