I have been trying to find the max value from an array. But I keep getting the following error. Please advise.
scores = [19212 56722 73336
To get the indices of the maximal value: scores=1:10; find(scores == max(scores))
If you have two maximum values:
clear max scores=10:-1:1; scores=[scores 10]; find(scores == max(scores)) ans = 1 11
As you might guess max return the max of an array:
max
>> max(scores) ans = 10