FInd area of overlapping circles using circlem

9 vues (au cours des 30 derniers jours)
Allyson Jennings
Allyson Jennings le 6 Nov 2020
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'))

Réponses (1)

Amanpreetsingh Arora
Amanpreetsingh Arora le 10 Nov 2020
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.

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by