find maximum value indices
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
per isakson
2015-2-10
Replace
find( longm == max(longm(dataind{n})) )
by
find( longm == max(longm(dataind{n})), 1, 'first' )
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!