Guest User

Untitled

a guest
Jan 13th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.49 KB | None | 0 0
  1. for i = 2:6
  2.     m = 2*i;
  3.     t = 0:0.01:2*pi/m;
  4.     x = (1/2).*min(sec(m.*t/4), csc(m.*t/4)).*cos(t);
  5.     y = (1/2).*min(sec(m.*t/4), csc(m.*t/4)).*sin(t);
  6.     figure(1)
  7.     plot(x,y, 'DisplayName', ['m = ' num2str(m)])
  8.     hold on
  9.     t = 0:0.01:2*pi;
  10.     x = (1/2).*min(sec(m.*t/4), csc(m.*t/4)).*cos(t);
  11.     y = (1/2).*min(sec(m.*t/4), csc(m.*t/4)).*sin(t);
  12.     figure(2)
  13.     plot(x,y, 'DisplayName', ['m = ' num2str(m)])  
  14.     hold on
  15. end
  16. figure(1)
  17. legend()
  18. figure(2)
  19. legend()
Advertisement
Add Comment
Please, Sign In to add comment