Question: E Adobe Acrobat Paragraph IS Styles Write a function called pyth that takes two input arguments a and b. The inputs are arrays of the
E Adobe Acrobat Paragraph IS Styles Write a function called pyth that takes two input arguments a and b. The inputs are arrays of the same size. For example, it one is a scalar the other is a scalar, or if one is a 3-by-7 matrix, then the other is too. The fune tion does not have to check the format and size of the input. The function re tums one output argument, e, which is also the same size as the inputs. Each element of c is the hypotenuse of a right triangle, while the corresponding elements of a and b are the other two sides of the same triangle. The function needs to compute e according to the Pythagorean theorem. Note that the built-in MATLAB functions sqrt computes the square root. Consider the fol- lowing run >> b- [4 3:1 2) b= i >> A[341 set (5) 3.0000 1.0000 4.0000 2.2361 >> Pyth(a,b) 5.0000 1.4142 5.0000 3.0000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
