Position of element in a row

조회 수: 3 (최근 30일)
Inna Pelloso
Inna Pelloso 2021년 2월 9일
댓글: madhan ravi 2021년 2월 9일
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?
madhan ravi
madhan ravi 2021년 2월 9일
doc transpose

댓글을 달려면 로그인하십시오.

추가 답변 (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