Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for j=1:11510
- %Vb=zeros(3,11510);
- H=transform(Phid(j),Thetad(j),Psid(j));
- Vb(1:3,j)=H*Vi(1:3,j);
- Vb
- end
- function H=transform(phi,theta,psi)
- A=[1 0 0;0 cosd(phi) sind(phi);0 -sind(phi) cosd(phi)]%H2toB matrix
- B=[cosd(theta),0,-sind(theta);0,1,0;sind(theta),0,cosd(theta)]%H1to2 matrix
- C=[cosd(psi),sind(psi),0;-sind(psi),cosd(psi),0;0,0,1]%HIto1 matrix
- H=A*B*C%HItoB transformation matrix
- %Vb=H*Vi%applying the transformation matrix to Vi to get Vb
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement