Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started