Data Reduction and sub set of data
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
amberly hadden
le 3 Déc 2014
Modifié(e) : Image Analyst
le 9 Déc 2014
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
0 commentaires
Réponse acceptée
Image Analyst
le 3 Déc 2014
14 commentaires
Image Analyst
le 9 Déc 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, :)
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!