Position of element in a row

1 次查看(过去 30 天)
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

采纳的回答

madhan ravi
madhan ravi 2021-2-9
Use second output of find()
help find
  4 个评论
Inna Pelloso
Inna Pelloso 2021-2-9
Thank you. What does the '.' do?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by