I was looking at an array and it reminded me kind of a matrix. Are arrays a type of matrix? I was just thinking about it and wanted to know for sure.
Are arrays sort of like matrices?
Started by Sionofdarkness, Jul 22 2006 12:29 PM
5 replies to this topic
#1
Posted 22 July 2006 - 12:29 PM
|
|
|
#2
Posted 22 July 2006 - 02:22 PM
Yup. Multi-dimensional arrays are even more like a matrix. To think of it in programming think about a chess board. Not sure how many squares are across or up or down but lets say 10.
You'd make an array like array[10][10] (not sure howto in Java as I don't know java) and each cell would represent a place on the board such as
A 1 2 3 4 5 6
B 1 2 3 4 5 6
C 1 2 3 4 5 6
D 1 2 3 4 5 6
E 1 2 3 4 5 6
...
Hence you would get your moves like A3 or E4. Sort of like a spreadsheet in excel.
You'd make an array like array[10][10] (not sure howto in Java as I don't know java) and each cell would represent a place on the board such as
A 1 2 3 4 5 6
B 1 2 3 4 5 6
C 1 2 3 4 5 6
D 1 2 3 4 5 6
E 1 2 3 4 5 6
...
Hence you would get your moves like A3 or E4. Sort of like a spreadsheet in excel.
#3
Posted 23 July 2006 - 06:19 AM
Yes and no. An array is presented visually and referenced much like a matrix. However, it does not have any arithmetic operations, and the way it is stored in a computer's memory is usually as a line, regardless of the number of dimensions. An array can have far more than just 2 dimensions.
#4
Posted 29 July 2006 - 09:32 AM
What does an array with more than two dimensions look like? I can't imagine how it could look with more than two.
#5
Posted 29 July 2006 - 11:36 AM
You can visuallize a 3d array as being a cube. Above 3 dimensions, it's hard to visuallize, but can be very useful. 4d could be thought of as having several Excel workbooks, each with multiple sheets and each sheet having the 2d grid of cells. 5d could be similar, but multiple computers of multiple workbooks.
#6
Posted 21 August 2006 - 11:30 AM
Cool. I'm reviewing some Algebra II right now and I'll go over matrices again.


Sign In
Create Account


Back to top









