Plotting ellipses around the data points and circle around the cluster points
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have these points xy
xy = [10 -10; 1 0; -1 0; 0 -1; 0 1 ;11 -10; -1 -1];
scatter(xy(:,1),xy(:,2))
grid on
xlim([-20 20])
ylim([-15 15])
I want to mark a clusters of the data by circle. This is the function that I used incircle()
[C,R] = incircle(A(:,1),A(:,2));
viscircles(C,R,'color','b')
It does not plot proper circle around the data.
After this want to draw ellipse around all data plotEllipses
plotEllipses([0, 0], [10, 0.5])
But I dont know how to rotate ellipse
The result should be:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/818809/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Matt J
am 30 Nov. 2021
At the very end of the the Examples tab of
you will find examples for how to plot circles and rotated ellipses.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!