Introduction : In this article, we write program for the question How to plot matlab one full cycle of parametric equations x(t)=cos(t)+(1/3)cos(5t)+(1/5)cos(19t),y(t)=sin(t)+(1/3)sin(5t)+(1/5)sin(19t).
Question : Write Matlab program to plot one full cycle of the curve formed by parametric equations
\[x(t)=\cos\left(t\right)+\frac{1}{3}\cos\left(5t\right)+\frac{1}{5}\cos\left(19t\right)\]
\[ y(t) =\sin\left(t\right)+\frac{1}{3}\sin\left(5t\right)+\frac{1}{5}\sin\left(19t\right)\]
for \( s \in [0,2\pi]\)
Solution :
Given parametric equations
\[x(t)=\cos\left(t\right)+\frac{1}{3}\cos\left(5t\right)+\frac{1}{5}\cos\left(19t\right)\]
\[ y(t) =\sin\left(t\right)+\frac{1}{3}\sin\left(5t\right)+\frac{1}{5}\sin\left(19t\right)\]
Since the period of x(t) and y(t) is \(2\pi\) Hence the curve (x(t),y(t)) will complete one full cycle for t in the interval \([0, 2\pi]\)
%matlab program to plot a complete cycle formed by given parametric equations
t=linspace(0,2*pi);
x=@(t)cos(t)+(1/3)*cos(5*t)+(1/5)*cos(19*t);
y=@(t) sin(t)+(1/3)*sin(5*t)+(1/5)*sin(19*t);
plot(x(t),y(t))
xlabel('x')
ylabel('y')
title('one complete cycle')
%output results
