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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/316029/image.png)
4 个评论
Rik
2020-6-15
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
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/316086/image.png)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!