Question: use MATLAB The distance (length) between any two points (x1,y1) and (x2,y2) is: distance=(x1x2)2+(y1y2)2 1 The area of a triangle is: Area=s(sa)(sb)(sc) where a,b,c are
The distance (length) between any two points (x1,y1) and (x2,y2) is: distance=(x1x2)2+(y1y2)2 1 The area of a triangle is: Area=s(sa)(sb)(sc) where a,b,c are the lengths of three edges of triangle, and s=2a+b+c, a) create a function which can calculate, return the lengths of three edges of a triangle and its area. (note: must use only one function in this problem) b) write a script that ask user to enter x and y coordinates of three vertices of a triangle, then use the function in a) to display the lengths of three edges and area of the triangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
