Return Row of Array corresponding to a certain element?

 Risposta accettata

A(any(A==a,2),:)

2 Commenti

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Chemistry in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by