Position of element in a row

4 visualizaciones (últimos 30 días)
Inna Pelloso
Inna Pelloso el 9 de Feb. de 2021
Comentada: madhan ravi el 9 de Feb. de 2021
Hi,
I have a 3 x 2 matrix, A:
A = [1 2 3; 3 5 4]
How can I find the position of the number 3 in each row? I want to create B = [3;1]
Any help would be aprpeciated!
Inna

Respuesta aceptada

madhan ravi
madhan ravi el 9 de Feb. de 2021
Use second output of find()
help find
  4 comentarios
Inna Pelloso
Inna Pelloso el 9 de Feb. de 2021
Thank you. What does the '.' do?
madhan ravi
madhan ravi el 9 de Feb. de 2021
doc transpose

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting 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