Advertisement
Guest User

Untitled

a guest
Feb 8th, 2025
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.28 KB | Science | 0 0
  1. function theta2 = rot_elps(a,b,theta1)
  2.  
  3. r1=sqrt((a^2*b^2)/((b*cos(theta1))^2+(a*sin(theta1))^2));
  4. r2=a+b-r1;
  5.  
  6. costheta2=sqrt(((a^2*b^2)/(r2^2)-a^2)/(b^2-a^2))*sign(sin(theta1));
  7. sintheta2=sqrt(((a^2*b^2)/(r2^2)-b^2)/(a^2-b^2))*sign(cos(theta1));
  8.  
  9. theta2=atan2(sintheta2,costheta2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement