Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function Description: You will be given an array of numbers representing the likelihood that a pokemon can be found in a certain region. Return a

image text in transcribed

Function Description: You will be given an array of numbers representing the likelihood that a pokemon can be found in a certain region. Return a new array where each element is the average of the value from the old array and its eight surrounding neighbors. Since edges and corners do not have eight neighbors, they are deleted from the new array. A trivial example is as follows: [ 24 2; 4 3 4; 2.4 2] [3] Example: >> oldMap = [4 5 3 10; 5 0 1 7; 5 6 9 11; 9 8 2 22]; >> updatedMap = pokeMigration (oldMap) >> updatedMap [4.22 5.78; 5.00 7.33] Notes: Round the updated array to 2 decimal places. The initial array is guaranteed to be at least 3x3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

If ( A^2 - A + I = 0 ), then inverse of matrix ( A ) is?

Answered: 1 week ago

Question

What is computer neworking ?

Answered: 1 week ago