Is it possible to make a circle containing specific points?
13 次查看(过去 30 天)
显示 更早的评论
I want to make a circle using 'percentile'.
for example, If the percentile is 100, the circle contains every points.
I know how to make a quadrangle using perenctile. but i have no idea making a circle using percentile.
Thanks.
4 个评论
Jan
2022-6-2
@Sierra: Let me ask you again to provide some input data, such that the readers do not have to guess, how the dots are stored. Many of your questions are hard or impossible to answer, because you do not provide enough details and several questions for clarifications did not get any response from you.
This is not an efficient way to use the forum. Please read and consider this: https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
采纳的回答
Image Analyst
2022-6-2
numPoints = 200;
x = rand(1, numPoints) - 0.5;
y = rand(1, numPoints) - 0.5;
plot(x, y, 'b.', 'MarkerSize', 20);
grid on;
radii = sort(sqrt(x.^2 + y.^2), 'ascend');
% Find circle with 70% of the points
index = 70*length(radii)/100
radius = radii(index)
viscircles([0,0], radius, 'Color', 'r')
title('70% of points are within the red circle')
axis square
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!