Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. syms a b g
  2. Rz1 = [cos(a) -sin(a) 0; sin(a) cos(a) 0; 0 0 1];
  3. Ry1 = [cos(b) 0 sin(b); 0 1 0; -sin(b) 0 cos(b)];
  4. Rz2 = [cos(g) -sin(g) 0; sin(g) cos(g) 0; 0 0 1];
  5. Rzyz1 = Rz1*Ry1*Rz2
  6.  
  7. %expand(Rzyz1(1,1)^2)
  8. %expand(Rzyz1(1,2)^2)
  9. %expand(Rzyz1(2,1)^2)
  10. %expand(Rzyz1(2,2)^2)
  11. simplify(Rzyz1(1,1)^2+Rzyz1(1,2)^2)
  12.  
  13. for i = 3:1
  14. y=0
  15. for j = 3:1
  16. x=0
  17. for n = 3:1
  18. y=y+1
  19. for m = 3:1
  20. A = simplify(Rzyz1(i,j)^2+Rzyz1(n,m)^2);
  21. x=x+1
  22. end
  23. end
  24. end
  25. end
  26. A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement