How to assign only first member in matrix

1 view (last 30 days)
I am using q(t) = find(A == max1(t));
But problem here is in max1(4) has value of 134 and in A 134 is repeated two times I want only first location of 134 how to do that ?

Accepted Answer

madhan ravi
madhan ravi on 24 Jun 2019
Edited: madhan ravi on 24 Jun 2019
q(t) = find(A == max1(t),1,'first')

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!