필터 지우기
필터 지우기

How to draw Lissajous curve or Figure 8 from sine and cose function?

조회 수: 27 (최근 30일)
i feel difficulty to draw the Lissajous curve correctly as it is shifted. can also be understand from the attached figure. can anyone please help me to resolve this issue?
t =0:pi/10:2*pi;
x = 11*-cos(t);
y = 11*sin(t);
%cancatenate
x = cat(2,x4,y4);
y= cat(2,y4,x4);
  댓글 수: 4
David Goodmanson
David Goodmanson 2020년 6월 15일
Hi Muhammad,
see Lissajous Curve in Wikipedia
Rik
Rik 2020년 6월 15일
This comment was flagged by Muhammad khan about 3 hours ago:
Thanks for your reply, I have added a piece of code that i used to draw the figure 8. As X and Y contain data points in the code. i used these data points for further processing.

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 15일
편집: Ameer Hamza 2020년 6월 15일
Try this code
t = 0:0.01:2*pi;
a = 3;
b = 2;
delta = pi/2;
x = cos(a*t+delta);
y = sin(b*t);
plot(x, y)
a, b, and delta are same as used at this link: https://en.wikipedia.org/wiki/Lissajous_curve

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by