Borrar filtros
Borrar filtros

I have a 17658x1 double matrix. I want to find the values of indices when matrix elements are equal to k(here .1).

1 visualización (últimos 30 días)
I have a 17658x1 double matrix. I want to find the values of indices when matrix elements are equal to k(here .1).

Respuesta aceptada

Birdman
Birdman el 24 de Feb. de 2018
For instance, imagine you want to find 1 in a randomly generated matrix:
A=randi([1 5],17658,1);&demo data
idx=find(A==1);
  3 comentarios
Abhishek Maurya
Abhishek Maurya el 25 de Feb. de 2018
Editada: Abhishek Maurya el 25 de Feb. de 2018
Thankyou so much. idx=find(A==k); is working properly for floating numbers too, unless the exact value of the number is known like k=3.051757812500000e-05. Thankyou Birdman,Stephen Cobeldick.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by