Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
how to select items from a matrix depending on their values
조회 수: 1 (최근 30일)
이전 댓글 표시
suppose i have a matrix [1 2 3 4 5 6 7 8 9 10] i want to select values which are greater than 5 but less than 7. i am not getting the right command
댓글 수: 0
답변 (1개)
Image Analyst
2014년 1월 2일
Try this:
m = [1 2 3 4 5 6 7 8 9 10]
elementsToExtract = m > 5 & m < 7
extractedElements = m(elementsToExtract)
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!