Help! Drawing markers in a circle in specific location
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
KSSV
2016년 11월 9일
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!