Increase or decrease values until condition is true?
1 次查看(过去 30 天)
显示 更早的评论
I have 3 circles (red ones) and Mean Square Error (showed by blue circles). So my idea, that I want to implement is: How to increase or decrease the radii of the red circles (in the area of blue circles) until all 3 of them have common intersection?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156195/image.jpeg)
And my code is here:
Center1=[3.34, 0.5];
Center2=[3.47, 3.27];
Center3=[0.5, 3.1];
radius1=2;
radius2=1.3;
radius3=1.5;
[x_intersection1_2,y_intersection1_2] = circcirc(Center1(1),Center1(2),radius1,Center2(1),Center2(2),radius2);
[x_intersection1_3,y_intersection1_3] = circcirc(Center1(1),Center1(2),radius1,Center3(1),Center3(2),radius3);
[x_intersection2_3,y_intersection2_3] = circcirc(Center2(1),Center2(2),radius2,Center3(1),Center3(2),radius3);
MSE1=0.5;
MSE2=0.25;
MSE3=0.2;
figure
%http://www.mathworks.com/matlabcentral/fileexchange/2876-draw-a-circle
circle([Center1(1),Center1(2)],radius1,1000,'r'), hold on
circle([Center2(1),Center2(2)],radius2,1000,'r');
circle([Center3(1),Center3(2)],radius3,1000,'r'),
circle([Center1(1),Center1(2)],radius1+MSE1,1000),
circle([Center2(1),Center2(2)],radius2+MSE2,1000);
circle([Center3(1),Center3(2)],radius3+MSE3,1000),
circle([Center1(1),Center1(2)],radius1-MSE1,1000),
circle([Center2(1),Center2(2)],radius2-MSE2,1000);
circle([Center3(1),Center3(2)],radius3-MSE3,1000),
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!