MATLAB Answers

find maximum value indices

3 views (last 30 days)
shobhit mehrotra
shobhit mehrotra on 10 Feb 2015
Commented: per isakson on 10 Feb 2015
Im trying to find the indices number of the max of a certain function.
delcx(:,n) = (massch4(max(longm(dataind{n}))))
I want to find the massch4 at the location where longm is a max value. Can I do that in one line? Can I use the find function?
per isakson
per isakson on 10 Feb 2015
find( longm == max(longm(dataind{n})) )
find( longm == max(longm(dataind{n})), 1, 'first' )

Sign in to comment.

Answers (0)


Community Treasure Hunt

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

Start Hunting!