Write a user-defined MATLAB function that determines the circumference ofa triangle when
Chapter 7, Problem 16(choose chapter or problem)
Write a user-defined MATLAB function that determines the circumference ofa triangle when the coordinates of the vertices are given. For the functionname and arguments, use [cr] = cirtriangle (A, B, C). The input argumentsA, B, C are vectors with the coordinates of the vertices, and the outputvariable cr is the circumference. The function should work for a triangle inthe x-y plane (each vertex is defmed by two coordinates) or for a triangle inspace (each vertex is defmed by three coordinates). Write the code of cirtrianglesuch that it has a subfunction or an anonymous function for calculatingthe distance between two points. Use the function to determine thecircumference of triangles with the following vertices:(a) A = (1, 2), B = (10, 3), C = (6, 11)(b) A = (-1.5, -4.2, -3), B = (-5.1, 6.3, 2), C = (12.1, 0, -0.5)
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer