Return Row of Array corresponding to a certain element?

 Respuesta aceptada

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

2 comentarios

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
Thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Chemistry en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Dic. de 2016

Comentada:

el 17 de Dic. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by