Question: This is for Matlab Write an anonymous function that will calculate the third side of a triangle using the law of cosines as c =
This is for Matlab
Write an anonymous function that will calculate the third side of a triangle using the law of cosines as c = Va? + b2 2ab cos(0) with variables, a, b, and O (see help elfun). Set up a for loop that will call the anonymous function with an input vector containing the two legs of a triangle and another input for the angle, 0, (in degrees) between the two triangle legs. Using the for loop, specify that a is within the range 4 20 (inclusive) with increments of 4, b equals a multiplied by 2.5, and e (degrees) equals a multiplied by 10. Output a table (with column headers) including values for a, b, 0, and c with 2 digits after the decimal point in columns 10 characters wide
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
