Help! Drawing markers in a circle in specific location

1 vue (au cours des 30 derniers jours)
Rebecca Park
Rebecca Park le 9 Nov 2016
Réponse apportée : KSSV le 9 Nov 2016
I'm really new to MatLab and I've been given this code but my Lecturer didn't explain it at all!
cL=-5:2*pi/8:9; c=-20:2*pi/8:9; R=20; x1=[R*cos(c') R*sin(c')]; xL=[R*cos(cL') R*sin(cL')];
plot(x1(:,2),x1(:,1),'ko','MarkerSize',30)
I want to be able to move the markers so they stay in the circle formation but are placed on the left or right but I can't figure out how to do that at all!
Any help? Or just a walk through of what each bit means.
Thank you,
Becky

Réponses (1)

KSSV
KSSV le 9 Nov 2016
clc; clear all ;
cL=-5:2*pi/8:9;
% c=-20:2*pi/8:9;
c = linspace(0,2*pi) ;
R=20;
x1=[R*cos(c') R*sin(c')];
xL=[R*cos(cL') R*sin(cL')];
plot(x1(:,1),x1(:,2),'r')
hold on
plot(xL(:,2),xL(:,1),'ko','MarkerSize',30)
axis equal

Catégories

En savoir plus sur Lighting, Transparency, and Shading 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