Here I provide some Matlab codes for your use.

Click on the name of the function to view the code in a separate window, or contextual click to save as...
First is a pair of recursive functions to find the minimum or maximum value appearing in an array of arbitrary dimension. They cannot currently return the desired index of the value. If you write one which is capable of indexing, please send me a copy!