Question: Anonymous functions Consider a general triangle with side lengths a, b, and c and angles A, B, and C as shown below. Anonymous functions Consider
Anonymous functions Consider a general triangle with side lengths a, b, and c and angles A, B, and C as shown below.

Anonymous functions Consider a general triangle with side lengths a, b, and c and angles A, B, and C as shown below. Complete the script to define the following two anonymous functions 1. Create an anonymous function called ThirdSide, which accepts, in order, the lengths of sides a and b and angle C,and uses the Law of Cosines to compute the length of side c. Recall the Law of Cosines states c-a' +b* - 2ab(cos(C)) computes the area of the triangle. Recall the area of a triangle can be calculated with areaablsin(C) degrees. Assign the results to the variables SideC and AreaABC respectively. 2. Create an anonymous function called TriangleArea, which accepts, in order, the lengths of sides a and b and angle C, and 2 3. Use ThirdSide to compute the length of side c and TriangleArea to find the area for a triangle with a-5, b-8, and C-50 Your Script Save C Reset MATLAB Documentation 2% Enter the commands for the two anonymous functions ThirdSide and Traing!eArea here. 4% Note the test suite will call the two anonymous functions 5% Be sure to use the exact function handle names specified in the problem statement. 7 8 SideC ThirdSide (5,8, 50) 9 AreaABCTriangleArea(5,8,5e) 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
