Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.47 KB | None | 0 0
  1. for j=1:11510
  2.     %Vb=zeros(3,11510);
  3.     H=transform(Phid(j),Thetad(j),Psid(j));
  4.     Vb(1:3,j)=H*Vi(1:3,j);
  5.     Vb
  6. end
  7.  
  8.  
  9. function H=transform(phi,theta,psi)
  10. A=[1 0 0;0 cosd(phi) sind(phi);0 -sind(phi) cosd(phi)]%H2toB matrix
  11. B=[cosd(theta),0,-sind(theta);0,1,0;sind(theta),0,cosd(theta)]%H1to2 matrix
  12. C=[cosd(psi),sind(psi),0;-sind(psi),cosd(psi),0;0,0,1]%HIto1 matrix
  13. H=A*B*C%HItoB transformation matrix
  14. %Vb=H*Vi%applying the transformation matrix to Vi to get Vb
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement