Programming Previous page   Next Page

Data Structures


The most basic data structure in MATLAB® is the matrix: a two-dimensional, rectangularly shaped data structure capable of storing multiple elements of data in an easily accessible format. These data elements can be numbers, characters, logical states of true or false, or even other MATLAB structure types. MATLAB uses these two-dimensional matrices to store single numbers and linear series of numbers as well. In these cases, the dimensions are 1-by-1 and 1-by-n respectively, where n is the length of the numeric series. MATLAB also supports data structures that have more than two dimensions. These data structures are referred to as arrays in the MATLAB documentation.

Creating and Concatenating Matrices
Create a matrix or construct one from other matrices.
Matrix Indexing
Access or assign to elements of a matrix using methods of row and column indexing.
Getting Information About a Matrix
Retrieve information about the structure or contents of a matrix.
Resizing and Reshaping Matrices
Change the size, shape, or arrangement of elements in an existing matrix.
Shifting and Sorting Matrices
Shift matrix elements along one or more dimensions, or sort them into an ascending or descending order.
Operating on Diagonal Matrices
Construct and manipulate matrices along a diagonal of the rectangular shape.
Empty Matrices, Scalars, and Vectors
Work with matrices that have one or more dimensions equal to zero or one.
Full and Sparse Matrices
Conserve memory and get optimal performance with more efficient storage of matrices that contain a large number of zero values.
Multidimensional Arrays
Create and work with arrays that have more than two dimensions.
Summary of Matrix and Array Functions
Quick reference to the functions commonly used in working with matrices.


Previous page  Programming Creating and Concatenating Matrices Next page

© 1994-2005 The MathWorks, Inc.