# how can i patch a circle in the origin of the axis?

20 visualizzazioni (ultimi 30 giorni)
juan diego villada il 7 Dic 2016
Commentato: Iddo Weiner il 8 Dic 2016
wich cordinates can i use
##### 3 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
juan diego villada il 8 Dic 2016
thanks Iddo , that was what i needed
Iddo Weiner il 8 Dic 2016
If you could accept an answer it would be of help for the next people who read this question.. My answer is given below, and KSSV's answer is essentially the same so - whichever one, it doesn't really matter...
Good luck

Accedi per commentare.

### Risposte (2)

KSSV il 8 Dic 2016
clc; clear all ;
R = 1 ;
th = linspace(0,2*pi) ;
x = R*cos(th) ;
y = R*sin(th) ;
patch(x,y,'r') ;
axis equal
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

Iddo Weiner il 8 Dic 2016
See my initial answer, I posted it as a comment by mistake:
rad = 10; %this is the radius (change it if you like)
angle = 0:0.001:2*pi; % a full circle range
plot(x_cord, y_cord);
hold on
plot(xlim,[0 0])
plot([0 0],ylim)
hold off
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by