Data Reduction and sub set of data

조회 수: 2 (최근 30일)
amberly hadden
amberly hadden 2014년 12월 3일
편집: Image Analyst 2014년 12월 9일
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

채택된 답변

Image Analyst
Image Analyst 2014년 12월 3일
  댓글 수: 14
Image Analyst
Image Analyst 2014년 12월 9일
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 2014년 12월 9일
편집: Image Analyst 2014년 12월 9일
hi its producing same data set insread
solved my problem
:) Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by