Unfortunately, I cannot write it for you, I'm a Classic user right now, but I'll give you the barebone idea.
First, Arrays. Think of arrays like the first number defines how many drawers are in your file cabinet.
MyArray(10) would have 10 drawers labeled 1 through 10.
You can add more dimensions to the array to organize things. A second number would be the number of dividers in each drawer.
MyArray(10,3) would have 10 drawers with 3 dividers in each drawer. That's a total of 30 spots to store data.
Normally people stick with two dimensional arrays, but if you want to delve deeper here's how to think about it. A third number would place folders inside the dividers.
MyArray(10,3,4) would have 10 drawers with 3 dividers in each drawer, and 4 folders in each divider.
You can have up to 5 dimensions.....but I haven't seen anybody that uses more than 3.
To implement this into a program that saves matrix data you would want a drawer for each point on the matrix. For simplicity's sake let's say there's 10 points.
MatrixPoints#(10)
That is your starting point. Now you need to think about the characteristics of a point on a matrix. Probably the most important thing is that height of the point. Since the height is expressed as one value you only need one divider for each drawer. Special note, if you only want one divider per drawer, you don't even need to add a second dimension.
MatrixPoints#(10) This will serve to store the height of 10 points on a matrix.
But then, how will we know which points to set to what heights? You will need to add more information.
MatrixPoints#(10,3) This separates each drawer with 3 dividers. This leaves the first slot for the X coordinate of the point. The second slot for the Y coordinate of the point. And the third slot for the height of the point.
If you need to add more data you can make more arrays, add more slots to the existing dimensions, or add more dimensions.
Crazy Donut Productions
Current Project: KillZone