Question: Needs to be written in Matlab. 4- . Write a user-defined MATLAB function that determines the circumference of a triangle when the coordinates of the

Needs to be written in Matlab.
4- . Write a user-defined MATLAB function that determines the circumference of a triangle when the coordinates of the vertices are given. For the function name and arguments, use [er] - cirtriangle (A, B, C). The input argu- ments A, B,C are vectors with the coordinates of the vertices, and the output variable cr is the circumference. The function should work for a triangle in the x-y plane (cach vertex is defined by two coordinates) or for a triangle in space (each vertex is defined by three coordinates). Write the code of cir- triangle such that it has a subfunction or an anonymous function for cal- culating the distance between two points. Use the function to determine the circumference of triangles with the following vertices: (b) As(-1.5,-42,-3), B (-5.1, 6.3, 2), _ (121,0,-05)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
