How can I count the numbers of NaNs in some determined coordinates when you use the comand 'coastlines'?
조회 수: 1 (최근 30일)
이전 댓글 표시
This program gives me the numer of NaNs in all the world but not in one particular country.
worldmap('Spain')
load coastlines
sum(sum(isnan(coastlat)))
댓글 수: 0
답변 (1개)
Chidvi Modala
2020년 12월 30일
You may use shaperead function to get latitudes and longitudes of a particular country. You can refer to the following example to count the numbers of NaNs in a particular country coordinates
Val = shaperead('landareas', 'UseGeoCoords', true,...
'Selector',{@(name) strcmp(name,'Africa and Eurasia'), 'Name'});
sum(isnan(Val.Lat));
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!