find maximum value indices

조회 수: 1 (최근 30일)
shobhit mehrotra
shobhit mehrotra 2015년 2월 10일
댓글: per isakson 2015년 2월 10일
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?
Thanks!
  댓글 수: 10
shobhit mehrotra
shobhit mehrotra 2015년 2월 10일
I have that in another line, once I can get the indices Ill substitute it in
per isakson
per isakson 2015년 2월 10일
Replace
find( longm == max(longm(dataind{n})) )
by
find( longm == max(longm(dataind{n})), 1, 'first' )

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by