Filter löschen
Filter löschen

Position of element in a row

3 Ansichten (letzte 30 Tage)
Inna Pelloso
Inna Pelloso am 9 Feb. 2021
Kommentiert: madhan ravi am 9 Feb. 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

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by