Question: Write a lisp function called FIND - MAX - LOCATION that looks through a 2 - dimensional 5 x 5 array of numbers and returns
Write a lisp function called FINDMAXLOCATION that looks through a dimensional x array of numbers and returns the LOCATION of the largest value in the array, in rowmajororder. So for an array like the following:
FINDMAXLOCATION would return the matrix location as a list of two values: That is the ij coordinates of the number in the example.
You will find it useful to review how to use LET to create local variables, and how to make doublynested LOOPs.
Here are some lisp expresions that create d arrays for you to test:
makearray :initialcontents
makearray :initialcontents ;; should return
NOTE: You should call the function as so: findmaxlocation a where a is the variable that holds your d array.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
