Question

SOLVE IN MATLAB Given a right triangle ABC, calculate the angle of Theta (degrees) located between...

SOLVE IN MATLAB

Given a right triangle ABC, calculate the angle of Theta (degrees) located between AC and AB given values a and b.

Note: https://en.wikipedia.org/wiki/Right_triangle#/media/File:Rtriangle.svg

Filename: Right_Triangle_01.m

Input: a, b

Output: Theta (degrees)

Homework Answers

Answer #1

Code in Matlab:

function CalculateAngle(a,b)
    p = atand(a/b);
    fprintf('the angle of Theta (degrees) located between AC and AB is %d \n',p);
end

CalculateAngle(1,0);
CalculateAngle(1,1);
CalculateAngle(0,1);
CalculateAngle(-1,1);

=======================================================================
Adding Image amnd Output.

Output

Let me know if there is any concern.


Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT