필터 지우기
필터 지우기

Return Row of Array corresponding to a certain element?

조회 수: 1 (최근 30일)
aljawada13
aljawada13 2016년 12월 17일
댓글: aljawada13 2016년 12월 17일
How can I call a certain row from an array "A" that contains a certain element (say "a")?

채택된 답변

the cyclist
the cyclist 2016년 12월 17일
A(any(A==a,2),:)
  댓글 수: 2
Image Analyst
Image Analyst 2016년 12월 17일
aljawada13, if "a" is a fractional number that is not a power of 2, or an integer, be mindful of the faq for comparing floating point numbers: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
aljawada13
aljawada13 2016년 12월 17일
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Chemistry에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by