I am trying to find the area of intersecting circles using circlem. I use the code below but there is no intersection between the two circles. Does anyone have any advice on how to calculate the area?
figure
ax = usamap('conus');
set(ax, 'Visible', 'off')
latlim = getm(ax, 'MapLatLimit');
lonlim = getm(ax, 'MapLonLimit');
states = shaperead('usastatehi',...
'UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(ax, states, 'FaceColor', [1 1 1])
intersect(circlem(26.912,-97.074, 58.323,'facecolor','red'),circlem(26.842,-96.98,58.323,'facecolor','red'))

回答 (1 件)

Amanpreetsingh Arora
Amanpreetsingh Arora 2020 年 11 月 10 日

0 投票

The "intersect" function returns common points in 2 inputs arrays and therefore is not useful for your case.
I believe that you are using the following "circlem" function from File Exchange. It seems that this function is only for plotting circles on map.
If you want to find overlapping areas between 2 circles, then the following discussion might help.
Basically, you will have to check whether the circles have partial, complete or no overlap and then calculate the intersection area accordingly. For the case of no overlap and complete overlap, it is 0 and area of smaller circle respectively. For partial overlap, the area is sum of two segments in the intersecting region.

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

リリース

R2019b

質問済み:

2020 年 11 月 6 日

回答済み:

2020 年 11 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by