Following code segment may help you to find the solution. Next time, please clearly mention what you have tried and any error messages you saw.
x = -pi/4:pi/256:pi/4;
yx = cos(x).*sqrt(2*cos(2.*x));
yy = sin(x).*sqrt(2*cos(2.*x));
plot(x,yx,x,yy);
theta = linspace (-pi/4,pi/4);
x = cos(theta).*sqrt(2.*cos(2.*theta));
y = sin(theta).*sqrt(2.*cos(2.*theta));
plot(x,y,-x,-y), grid on,
axis ('equal')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.