i have 3 column of data lat ,long &depth. how can i select depth within a range of lat& long?
1 次查看(过去 30 天)
显示 更早的评论
lat long depth 3 column of data.
0 个评论
回答(1 个)
Jos (10584)
2014-2-19
Using logical indexing. Assuming data holds the three columns, try this:
IsLatitudeInRange = data(:,1) > MinLatitude & data(:,1) < maxLatitude
IsLongitudeInRange = data(:,2) > MinLongitude & data(:,2) < maxLongitude
IsToInclude = IsLatitudeInRange & IsLongitudeInRange
DepthSelected = data(IsToInclude,:)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Other Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!