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

Controlling Command Window Input and Output

March 19th, 2010 No Comments   Posted in Documents

The format Function

The format function controls the numeric format of the values displayed. The function affects only how numbers are displayed, not how MATLAB software computes or saves them. Here are the different formats, together with the resulting output produced from a vector x with components of different magnitudes. Read More

bsxfun

December 6th, 2009 No Comments   Posted in Functions

bsxfun – Apply element-by-element binary operation to two arrays with singleton expansion enabled
Syntax Read More

Working with Matrices in Matlab

August 5th, 2009 No Comments   Posted in Documents

Generating Matrices

MATLAB software provides four functions that generate basic matrices. Read More

Manipulating Matrices

March 13th, 2008 No Comments   Posted in Documents

Matrices and Magic Squares

Matlab MatrisIn MATLAB, a matrix is a rectangular array of numbers. Special meaning is sometimes attached to 1-by-1 matrices, which are scalars, and to matrices with only one row or column, which are vectors. MATLAB has other ways of storing both numeric and nonnumeric data, but in the beginning, it is usually best to think of everything as a matrix. The operations in MATLAB are designed to be as natural as possible. Where other programming languages work with numbers one at a time, MATLAB allows you to work with entire matrices quickly and easily. A good example matrix, used throughout this book, appears in the Renaissance engraving Melancholia I by the German artist and amateur mathematician Albrecht Dürer. Read More