Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The points (0, -1, 3), (2, 0, 4), and (1, 4, -6) form a triangle in space. Let\'

ID: 2085960 • Letter: T

Question

The points (0, -1, 3), (2, 0, 4), and (1, 4, -6) form a triangle in space. Let's use Matlab to identify the type of triangle this represents (i.e. equilateral, isosceles, scalene, right-angled, acute, obtuse, etc.). a. Create a position vector in Matlab for each point of the triangle. Calculate the three angles of the triangle by constructing displacement vectors from the position vectors and taking the dot product. You may use the command norm to calculate the necessary vector magnitudes. b. What kind of triangle is this?

Explanation / Answer

Answer:

clc;

clear;

close;

x=input('the co-ordinates for the first point is')

y=input('the co-ordinates for the 2nd point is')

z=input('the co-ordinates for the 3rd point is')

A=dot(x,y)

B=dot(y,z)

C=dot(z,x)

a=angle(A,B)

b=angle(B,C)

c=angle(C,A)

d=norm(A)

e=norm(B)

f=norm(C)

if d=e

if e=f

display('equilatral triangle')

end if

if a+b<c

display('acute isosceles triangle')

if a+b>c

display('obtuse isosceles triangle')

end if

if a~=b

if b~=c

display('scalen triangle')

end if

end if

display('right angles triangle')

The programe is just all about the working n understanding of the triangles just refer to the basics if u have any doubts of the statements n feel free to comment if u have any other doubts.

Regards Spider.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote