Question: matlab please Function Name: levelUp Inputs: 1. (double) Nx7 Array of Pokmon statistics at previous levels 2. (double) Desired level of the Pokmon Outputs: 1.
matlab please
Function Name: levelUp Inputs: 1. (double) Nx7 Array of Pokmon statistics at previous levels 2. (double) Desired level of the Pokmon Outputs: 1. (double) 1x7 vector of Pokmon statistics at desired level Background: You are Brock. Your friend Ash Ketchum has dreams of becoming the greatest Pokmon trainer. As an aspiring breeder, you need to help him out by making sure his Pokmon have top-tier stats. You've measured their stats throughout the journey, but you want to be able to predict what their stats will end up at, or what other Pokmon's stats might be. You decide to use MATLAB to help him out Function Description: You will be given an array of a Pokmon statistics in which the first column represents a level and the second through 7th columns represents the numerical statistics corresponding to that level. The second input is the level at which you want to calculate the new statistics. Use linear interpolation, or extrapolation if necessary, to determine the new statistics, and output a vector of the statistics in the same order, with the desired level concatenated to the left. Example: The level values in the first column of the input and output are bolded. In this case, the value of the second column in the output is the linearly interpolated value at level 7 of the statistic values in the second column. The value of the third column is the linearly interpolated value at level 7 of the statistic values in the third column, and so on pikachu -50 111 82 60 102 63 142; level - 7 25 60 44 3253 33 72; 5 20 13 10119 15] out-levelUp(pikachu, level) out[7 24 1612 15 11 21] Notes: Round the output to the nearest integer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
