-
15
pages
-
English
-
Documents
Description
Interdisciplinary Center for Neural Computation Hebrew University, Jerusalem Israel ` MATLAB tutorial Assembled, edited and written by: Oren Shriki, orens@fiz.huji.ac.il and Oren Farber, orenf@cc.huji.ac.il 1MATLAB is a general-purpose mathematical software that is user friendly and very useful for data analysis, simulations, presentation of results, and more. The software runs on both UNIX and WINDOWS.MATLAB is an interpreter, which means that it performs every command line immediately after it is entered. A script file for MATLAB is called an m-file and it must have the extension 'm' (i.e. something like xxx.m). To run an m-file you just enter the name of the file without the extension at the MATLAB prompt. Getting started If you are a first-time user, you should invoke MATLAB now and follow along. The main tool of the MATLAB is the matrix (The name MATLAB stands for matrix laboratory). A matrix of one element is called a scalar and we can create one by entering: >> s = 3 A matrix of one row or one column is called a vector. We can create a row vector by entering: >> v = [8 3 5] To create a column vector we will use the ';' symbol to separate between the elements >> u = [4.2; 5; 7] We can create a 3 by 3 matrix simply by entering >> A = [3 4 0; 1 4 6; 9 7 2] Note the fact that you don't have to define a variable type - you just enter it. T We can now calculate quantities like the ...
-
Publié par
-
Langue
English