MATLAB Answers

0

How to assign only first member in matrix

Asked by Rohan Mehta on 24 Jun 2019 at 6:55
Latest activity Commented on by Rohan Mehta on 24 Jun 2019 at 7:05
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.

1 Answer

Answer by madhan ravi
on 24 Jun 2019 at 7:00
Edited by madhan ravi
on 24 Jun 2019 at 7:05
 Accepted Answer

q(t) = find(A == max1(t),1,'first')

  3 Comments

Error using find
Second argument must be a positive scalar integer.
see edited answer
done,
Thank you so much

Sign in to comment.