Help! Drawing markers in a circle in specific location

1 visualización (últimos 30 días)
Rebecca Park
Rebecca Park el 9 de Nov. de 2016
Respondida: KSSV el 9 de Nov. de 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

Respuestas (1)

KSSV
KSSV el 9 de Nov. de 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

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by