problem with unit circle

6 vues (au cours des 30 derniers jours)
nada ali
nada ali le 29 Août 2012
hi all,
how can Create a 2-by-n matrix with n equally distanced points on the unit circle?
thanks in advance

Réponses (2)

Rick Rosson
Rick Rosson le 30 Août 2012
Modifié(e) : Rick Rosson le 30 Août 2012
Please try:
n = 256;
dPhi = 2*pi/n;
phi = (-pi:dPhi:pi-dPhi);
z = exp(1j*phi);
C = [ real(z) ; imag(z) ];
figure;
plot(z);
HTH.
Rick

Image Analyst
Image Analyst le 30 Août 2012
Please read the FAQ for several examples of how to create circles: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by