FInd area of overlapping circles using circlem
조회 수: 11 (최근 30일)
이전 댓글 표시
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'))
댓글 수: 0
답변 (1개)
Amanpreetsingh Arora
2020년 11월 10일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!