-
12
pages
-
English
-
Documents
Description
Matlab® Tutorial Francesco Franco Matlab® is a software package that makes it easier for you to enter matrices and vectors, and manipulate them. The interface follows a language that is designed to look like the notation used in linear algebra. This tutorial guides you in the first steps for using Matlab®. Start the program, The main window is subdivided in three windows. The Command Window is the one where you enter your commands (after a >> which is used to denote a command line). I Vectors : Almost all of Matlab® Basic commands revolve around the use of vectors. To simplify the creation of vectors, you can define a vector by specifying the first entry, an increment, and the last entry. Matlab® will automatically figure out how many entries you need and their values. For example, to create a vector whose entries are 1,3,5,7, type the following >> 1:2:7 ans = 1 3 5 7 Matlab® keeps track of the last result. In the previous example a variable “ans” is created. To look at the transpose of the previous result, enter the following (‘ is the transpose operator): >> ans' ans = 1 3 5 7 To be able to keep track of the vectors you create, you can give them names. To create a row vector v: >> v=[1:2:7] v = 1 3 5 7 >> v v = 1 3 5 7 If you add a semi-colon (;) at the end of the command line, the result is not displayed. Matlab® will allow you ...
-
Publié par
-
Langue
English