Question: For a square matrix, we will define Matrix Center to be the cell in that matrix where the summation of all its adjacent cells (

For a square matrix, we will define Matrix Center to be the cell in that matrix where the summation of all its adjacent cells ( ) is the maximal (). Complete the following subroutine which defines a 10x10 matrix and fills it with random values. The subroutine should determine the coordinates () of the Matrix Center; that is the (row, column) indices. Note that you can define any extra functions to simplify your code and increase its efficiency.

Sub FindMatrixCenter ()

Dim M(9, 9) As Double

Randomize()

For r = 0 To 9

For c = 0 To 9

M(r, c) = Rnd() * 100

Next c

Next r

.

.

End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!