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

Desktop Tools

March 12th, 2008 No Comments   Posted in Documents

This section provides an introduction to MATLAB’s desktop tools. You can also use MATLAB functions to perform most of the features found in the desktop tools. The tools are: Read More

while

March 6th, 2008 No Comments   Posted in Controls

while Repeat statements an indefinite number of times.
The general form of a while statement is: Read More

for

March 6th, 2008 No Comments   Posted in Controls

for Repeat statements a specific number of times.
The general form of a for statement is: Read More

continue

March 6th, 2008 No Comments   Posted in Controls

continue Pass control to the next iteration of FOR or WHILE loop.
continue passes control to the next iteration of FOR or WHILE loop
in which it appears, skipping any remaining statements in the body
of the FOR or WHILE loop. Read More

clear

March 6th, 2008 No Comments   Posted in Functions

and from memory.
clear removes all variables from the workspace.
clear VARIABLES does the same thing.
clear GLOBAL removes all global variables.
clear FUNCTIONS removes all compiled M- and MEX-functions.

clear ALL removes all variables, globals, functions and MEX links.
clear ALL at the command prompt also removes the Java packages
import list. More »