Question: Fill in the blank space for the function myPower). Make sure that you read carefully the function specifications, le. what it takes as input and

Fill in the blank space for the function myPower). Make sure that you read carefully the function specifications, le. what it takes as input and what it returns WNP o array (function result = myPower(x,y) % calculates x to the power of y, i.e. X^y % Input: x is a 2D array of integers % y is an integer, a scalar % Return: 2D array the same size as x where each element is raise to the % power of y a scaze as CO O end Here are two example runs of this function >> X = 5; y = 3; >> result = myPower(x, y) result = 125 >> X = [2 3; 4 5]; y = -2; >> result = myPower(x, y) result = 0.2500 0.0625 0.1111 0.0400 Function i function result wypowr(x,y) 2 calculates to the power of y, 1... xy Input: Xia 20 array of integers % y is an Integer 5 Return: result is a 20 array, the same size as x where each element is raised to the power of y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
