Advertisement
Guest User

lab12

a guest
Jan 8th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.38 KB | None | 0 0
  1. t = -5:0.01:5;
  2. x = 3*cos(t).^3;
  3. y = 2*sin(t).^3;
  4. plot(x,y,1);
  5.  
  6. T = -3:0.01:3;
  7. Y = (e.^T+e.^-T)/2;
  8. plot(Y);
  9. #Curbe 3D
  10.  
  11. t = -8:0.01:10;
  12. x = 3+3*cos(t);
  13. y = 3*sin(t);
  14. z = 6*sin(t/2);
  15.  
  16. plot3(x,y,z,1);
  17.  
  18. #mesh
  19. x = -8:0.01:8;
  20. [Z,Y] = meshgrid(x); #generare coordonate
  21. z = sin(sqrt(Z.^2+Y.^2))./sqrt(Z.^2+Y.^2);
  22. mesh(Z,Y,z); #reprezentare suprafata
  23.  
  24. figure(2);
  25. surf(Z,Y,z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement