MATLAB Answers

How to assign only first member in matrix

5 views (last 30 days)
Rohan  Mehta
Rohan Mehta on 24 Jun 2019
Commented: Rohan Mehta on 24 Jun 2019
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 ?

  0 Comments

Sign in to comment.

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')

  3 Comments

Rohan  Mehta
Rohan Mehta on 24 Jun 2019
Error using find
Second argument must be a positive scalar integer.

Sign in to comment.

More Answers (0)

Sign in to answer this question.