Home > Flashcards > Print Preview
The flashcards below were created by user
TiaRae
on FreezingBlue Flashcards. What would you like to do?

What is an array?
 *The fundamental unit of data in any Matlab program.
 *A collection of data values organized into rows and columns.

What is a Vector?
An array with only one dimension.

An array with two or more dimensions is a _______.
Matrix

How is the size of the array determined?
It is specified by the number of rows and the number of columns in the array, (rows, columns).

What is a variable?
A region of memory containing an array, which is known by a userspecified name.

The simplest way to initialize a variable is to assign it one or more values and is written as
var = expression;
is known as an_______.
Assignment Statement

All elements of an array are listed in _____ order.
Row

This expression creates a 1 x 1 array containing the value 3.4
[3.4]

This expression creates a 1 x 3 array containing the row vector [1 2 3].
[1.0 2.0 3.0]

This expression creates a 3 x 1 array containing the column vector
[1
2
3]
[1.0; 2.0; 3.0]

This expression creates a 2 x 3 array containing the matrix
[1 2 3
4 5 6]
[1, 2, 3; 4, 5, 6]

This expression creates a 2 x 3 array containing the matrix
[1 2 3
4 5 6]

This expression creates an empty array, which contains no rows and no columns.
[ ]

Specifies a whole series of values by specifying the first value in the series, the stepping increment, and the last value in the series.
Colon Operator

The general form of a colon operator is _________.
first:incr:last

The first value is?
The first value in the series.

The incr value is?
The stepping increment or increasing increment

The last value is?
The value in that it stops at.


Generates an n x n matrix of zeroes.
zeros(n)

Generates an m x n matrix of zeros.
zeros(m,n)

Generates a matrix of zeros of the same size as arr.
zeros(size(arr))

Generates an n x n matrix of ones.
ones(n)

Generates an m x n matrix of ones.
ones(m,n)

Generates a matrix of ones of the same size as arr.
ones(size(arr))

Generates an n x n identity matrix.
eye(n)

Generates an m x n identity matrix.
eye(m,n)

Returns the length of a vector, or the longest dimension of a 2D array.
length(arr)

Returns two values specifying the number of rows and columns in arr.
size(arr)

_________ contains all ondiagonal elements are one, while all off diagnol elements are zero.
Identity Matrix

