Non-standard Matlab commands used in this tutorials are highlighted in green . For more information on Matlab, contact the Mathworks . The idea behind these tutorials is that you can view them in one window while running Matlab in another window.
Vectors Let's start off by creating something simple, like a vector.
First, suppose you would like to add 2 to each of the elements in vector 'a'. If the two vectors are the same length, it is easy. Functions To make life easier, Matlab includes many standard functions. Each function is a block of code that accomplishes a specific task. Matlab contains all of the standard functions such as sin, cos, log, exp, sqrt, as well as many others.