Inserting a circle at specific coordinates
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rasmus
am 19 Feb. 2014
Bearbeitet: Mischa Kim
am 19 Feb. 2014
I have a group of data, which when plotting gives me a circle. I want to have the circles center to be at (-1,1)in another plot of data.
How do i do this?
I hope someone can help me, thank you :)
1 Kommentar
Akzeptierte Antwort
Mischa Kim
am 19 Feb. 2014
Bearbeitet: Mischa Kim
am 19 Feb. 2014
Rasmus, for the general case (circle with noise) check out this entry in the File Exchange. The app will give you radius R and the center of the circle (xc,yc). With this data you can then simply
t = linspace(0,2*pi,100);
x_new = R*cos(t) + xc_new;
y_new = R*sin(t) + yc_new;
plot(x_new,y_new)
1 Kommentar
Mischa Kim
am 19 Feb. 2014
If your add-on question is about adding the circle to another plot then use
hold on
before the plot commands.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Geographic 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!