Arrays and Matrices in Block Diagrams
Normal Arrays and Matrices
A normal array or matrix, i.e. an array or matrix not used as message, has two methods, one for setting the content of a specific element and one for retrieving it. The read and write operations can occur independently of each other. The value to be written to the array is represented by the left (argument) pin, the corresponding index by the bottom-left pin. The result of reading from the array is represented by the return pin, and the index by the bottom-right argument pin.

Matrices are represented similarly, but each method takes two index arguments. The x-index is represented by the bottom left pin, like the index of an array. The y-index is represented by the pin at the top of the block with the top left pin being the index for writing to the matrix, and the top right pin the index when reading from it.
If you want to optimize the generated initialization code of arrays/matrices of scalar or enumeration type, activate the Generating Sparse Arrays target option. See also Initialization of Arrays and Matrices.
Arrays and Matrices used as Messages
An array or matrix used as message has one or two methods, depending on the message type. The available methods are the same as for normal arrays/matrices.

Both
In the context of a project, you can use the Protected Vector Indices option to protect array and matrix indices against over- or underflow.
See also
Get and Set Ports for Arrays and Matrices
Arrays, Matrices, Characteristic Lines and Maps
Variant Size for Arrays and Matrices
Variable Size for Arrays and Matrices