Advertisement
Guest User

Untitled

a guest
May 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.42 KB | None | 0 0
  1. X = [2,3,4 ; 3,3,4 ; 4,4,4 ; 5,4,4 ; 5,4,5 ; 4,4,5 ; 3,3,5 ; 2,3,5 ; 2,3,4];
  2. Xprim = [1 0 0 0; 0 1 0 0; 0 0 1 0; 3 2 1 1];
  3. hold on
  4.  
  5. theta = 30;
  6. OX = [1 0 0 0; 0 cos(theta) sin(theta) 0; 0 -sin(theta) cos(theta) 0; 0 0 0 1];
  7.  
  8. for theta = 30:30:360
  9.    rad = (pi * theta)/180;
  10.    OY = [cos(rad) sin(rad) 0 0; -sin(rad) cos(rad) 0 0; 0 0 1 0; 0 0 0 1];
  11.    res = xj * OY;
  12.    plot3(res(:,1), res(:,2), res(:,3));
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement