how can i search for largest negative value in a column in a matrix and return values in the corresponding row

Hi I have a table with columns latitude, longitude and shear wave anomaly. I want to search for the largest shear wave anomaly and return the corresponding latitude and longitude. how would i go about this?
cheers alex

Answers (1)

[max_val,idx]=max(A(:,3))
lat=A(idx,1) % corresponding latitude
long=A(idx,2) % corresponding longitude

Categories

Find more on Geoscience in Help Center and File Exchange

Tags

Asked:

on 17 Oct 2013

Edited:

on 17 Oct 2013

Community Treasure Hunt

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

Start Hunting!