Question

Write a computer program that takes as input two (2) rotation angles a and B (in degrees), and then calculates the DCMs C3 (a
please use matlab
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In this solution some predefined matlab functions are used. For more information, refer to matlab online library or drop a comment below. Please give a Thumbs Up, if solution is helpful.

Solution :

The code for the required task is given below along with the test results for the given input

a=125B75

Matlab Code :

clear;
clc;

a = input('Please Enter the value for Alpha (in degree)  : ');
b = input('Please Enter the value for Beta (in degree)   : ');


a1 = pi*a/180; % converting to radians
b1 = pi*b/180; % converting to radians

C3 = angle2dcm(a1,a1,a1); % Three axis Rotation
C1 = angle2dcm(b1,0,0); % One axis Rotation
D = C1*C3; % Product D


fprintf('\n The Results are as follows : \n')

fprintf('\n Angle Alpha   =  ')
disp([num2str(a),' Degree'])

fprintf('\n Angle Beta   =  ')
disp([num2str(b),' Degree'])

fprintf('\n DCM C3(a)   =  ')
C3

fprintf('\n DCM C1(b)  ')
C1

fprintf('\n Product D (C1*C3)  =   ')
D

Test Results :

Command Window Please Enter the value for Alpha (in degree) 125 : 75 Please Enter the value for Beta (in degree)Command Window The Results are as follows 125 Degree Angle Alpha Angle Beta 75 Degree = DCM C3 (a) C3= -0.4698 0.3290 -0.8192

NOTE : Feel free to ask further queries. Your positive rating would be appreciated and motivate me !

Add a comment
Know the answer?
Add Answer to:
please use matlab Write a computer program that takes as input two (2) rotation angles a and B (in degrees), and th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT