Code covered by the BSD License  

Highlights from
DCM from Euler angles

image thumbnail
from DCM from Euler angles by Dr. Murtaza Khan
Computes DCM from Euler angles for six basic sequence of rotations around X(Roll), Y(Pitch), Z(Ya)

dcmfromeulerTest.m
clc, close all,clear all,format compact

% % rotation angles in radians
roll=1.5;
pitch=1.2;
yaw=2.3;

% % Rotation sequence can be given either in r, p, y format or in X,Y,Z format
% % roll=r=X
% % pith=p=Y
% % yaw=y=Z

disp('Sequence of rotation: rpy'); 
DCM=dcmfromeuler(roll,pitch,yaw,'rpy') % order is roll-->pith-->yaw OR X-->Y-->Z

disp('Sequence of rotation: ryp');
DCM=dcmfromeuler(roll,pitch,yaw,'ryp')

disp('Sequence of rotation: pry'); 
DCM=dcmfromeuler(roll,pitch,yaw,'pry')

disp('Sequence of rotation: pyr');
DCM=dcmfromeuler(roll,pitch,yaw,'pyr')

disp('Sequence of rotation: yrp');
DCM=dcmfromeuler(roll,pitch,yaw,'yrp')

disp('Sequence of rotation: ypr');
DCM=dcmfromeuler(roll,pitch,yaw,'ypr')


% % % --------------------------------
% % % Author: Dr. Murtaza Khan
% % % Email : drkhanmurtaza@gmail.com
% % % --------------------------------

Contact us at files@mathworks.com