Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Matlab basic Tutorial
Posted:
May 27, 2010 5:14 AM
|
|
Matlab Tutorial 1- The basic features Let us start with something simple, like defining a row vector with components the numbers 1,2,3,4,5 and assigning it a variable name, say x
<< x=[1 2 3 4 5] x = 1 2 3 4 5
Note that we used the equal sign for assigning the variable name x to the vector, brackets to enclose its entries and spaces to separate them. (Just like you would using the linear algebra notation). We could have used commas ( , ) instead of spaces to separate the entries, or even a combination of the two. The use of either spaces or commas is essential! To create a column vector (MATLAB distinguishes between row and column vectors, as it should) we can either use semicolons ( ; ) to separate the entries, or first define a row vector and take its transpose to obtain a column vector. Let us demonstrate this by defining a column vector y with entries 6, 7, 8, 9, 10 using both techniques. Read more matlab tutorial
|
|
|
|