Logical Subscripting

May 10th, 2010 No Comments   Posted in Functions

The logical vectors created from logical and relational operations can be used to reference
subarrays. Suppose X is an ordinary matrix and L is a matrix of the same size that is the
result of some logical operation. Then X(L) specifies the elements of X where the
elements of L are nonzero. Read More

Linear Algebra

May 8th, 2010 No Comments   Posted in Controls

Informally, the terms matrix and array are often used interchangeably. More precisely, a
matrix is a two-dimensional numeric array that represents a linear transformation. The
mathematical operations defined on matrices are the subject of linear algebra. Read More

The magic Function

May 8th, 2010 No Comments   Posted in Functions

MATLAB actually has a built-in function that creates magic squares of almost any size.
Not surprisingly, this function is named magic. Read More