Filter Only Data Meeting Certain Criteria out of Excel Spreadsheet
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm trying to plot some data imported from Excel in MatLAB. The data is angle and latitude over the period of a year, so there is quite a lot of data (around 525,600 lines). However, I only care about data that's in the latitude range of 60 to 85 degrees. Is there a way in MatLAB to filter out only the 60-85 degree angle data?
댓글 수: 0
답변 (1개)
Star Strider
2023년 6월 21일
Use ‘logical indexing’ to return the desired values —
Lat = 90*rand(10,1);
Angle = pi*rand(size(Lat));
Data = table(Lat,Angle)
Lv = 60 <= Data.Lat & Data.Lat <= 85 % Logical Vector
DesiredResult = Data(Lv,:)
Make appropriate changes to work with your data.
.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!