フィルターのクリア

How to define an area with 1s to use 'areamat' function

1 回表示 (過去 30 日間)
Anitha Limann
Anitha Limann 2022 年 10 月 23 日
コメント済み: Anitha Limann 2022 年 10 月 23 日
Hello,
I am planning to use areamat function to calculate total area of african continent. I have set of lat lon data (set of data separated with NaN NaN). As areamat function calculate area of the region defined by 1s or zeros i want to say,
for all the values >=min(lon) and >=min(lat) and <=max(lat) and <=max(lat) are
africa = (those values).
i have not use this function before. So i am not sure if I misunderstood this funstion either.
I would truly appreciate if anyone could help me with this funtion and write a condiction as above.
Thank you!!
  2 件のコメント
dpb
dpb 2022 年 10 月 23 日
The area defined by min(lon) <= valX <= max(lon) and min(lat) <= valY <= max(lat) is a rectangular area that won't represent the actual continent of Africa all that well.
You'll have to have a boundary definition somewhere to ascertain whether a given coordinate pair is/is not within that area -- which would be what having the definition of the input array to areamat would give you if you had it already...but the above logic won't help you generate one, unfortunately.
I don't have mapping TB but there appears to be a dataset included in it -- let's just try something...
load coastlines
hM=worldmap('Africa');
geoshow('landareas.shp', 'FaceColor', [0.15 0.5 0.15])
Well, that gives an outline; there's example code that shows how stuff is broken down inside the coastlines lat, lon data, but I don't know at this point how one determines being in/out of the continent...
Good luck...
Anitha Limann
Anitha Limann 2022 年 10 月 23 日
Hello Thank you for your response.
I do have boundary points along the boundary of the African Continent. I did plot them as below. Now I want to calculate the area defined by these points. My data set is set of points separated by NaN but those sets are unodered.
Could you tell me if you have any method i could use to calculate area?
I tried areaint because these area latitudes and longitueds. But then it calculate only areas defined by each sub-dataset (please see the second image attached here).

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by