Data Reduction and sub set of data

3 views (last 30 days)
Hello every body,
I'm new with Matlab. I want to write a code whcih can be used on my grid file to reduce it to region of my interest. I have lat lon and displacement values. I want to define a circle of radius 100Km from a central point(lat lon) so that everything outside the circle delete and I get a resultant grid file with data of my own interest.
I would like to pay some reward (as Im a student) for this work.
Please let me know if anybody is interested
Thanks

Accepted Answer

Image Analyst
Image Analyst on 3 Dec 2014
  14 Comments
Image Analyst
Image Analyst on 9 Dec 2014
Try this code:
numbers = xlsread('test.xls');
lats = numbers(:, 1);
lons = numbers(:, 2);
z = numbers(:, 3);
lat1 = 58.4
lon1 = 26.1
z1 = 1.65
lat2 = 58.5
lon2 = 27
z2 = 1.11
desiredLats = lats >= lat1 & lats <= lat2
desiredLons = lons > lon1 & lons <= lon2
desiredZs = z <= z1 & z >= z2
rowsToExtract = desiredLats & desiredLons & desiredZs
extractedRows = numbers(rowsToExtract, :)
amberly hadden
amberly hadden on 9 Dec 2014
Edited: Image Analyst on 9 Dec 2014
hi its producing same data set insread
solved my problem
:) Thanks

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!