Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Machine Learning
- Classification
- Exercises · By topic
- Original format
- Text
- Searchable text
Topic-based study materials for Machine Learning in the Computer Engineering degree programme at Politecnico di Milano. The document covers: 1 Introduction to MATLAB This is an introduction to the MATLAB language for the course in Machine Learning . After a brief introduction of the basic operations on vector, matrix and cells, we will show some of the operators offered to program in the MATLAB language, some plot
Topic-based study materials for Machine Learning in the Computer Engineering degree programme at Politecnico di Milano. The document covers: 1 Introduction to MATLAB This is an introduction to the MATLAB language for the course in Machine Learning . After a brief introduction of the basic operations on vector, matrix and cells, we will show some of the operators offered to program in the MATLAB language, some plot
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
1 Introduction to MATLAB This is an introduction to the MATLAB language for the course in Machine Learning . After a brief introduction of the basic operations on vector, matrix and cells, we will show some of the operators offered to program in the MATLAB language, some plot options 1.1 Basics To start a script inMATLAB we should, at first: 1 clear %clear the workspace 2 clc %clear the command window 3 close all %close all the previously opened figures If you are not sure of the usage of a function (but you know its name) you can use: 1 help function_name otherwise you can ask it to Matlab Central.1 MATLAB does not require to initialize variables: 1 a = 15; 2 b = 5; If you want to print the value of a variable on the screen you should not use the semi– column at the end of the line: 1 c = a + b Any result coming from an operation inMATLAB which is not assigned to any variable is associated by default to the variable ans. The command whos returns the names of all the variables present in the current workspace as well as their properties. Any scalar 1http://it.mathworks.com/matlabcentral/?refresh=true. 1 1 Introduction to MATLAB number in MATLAB is considered a 1× 1 matrix; any vector is considered as an n× 1 (column) or 1× n (row) matrix. There are reserved variables names, for instancei is the imaginary unit: 1 i 2 j 3 pi 4 eps 5 Inf 6 NaN If you want to check if you are using a reserved word inMATLAB you should check with iskeyword(). 1.2 Vectors and Matrix InMATLAB , we use the square brackets (concatenation operation) to define vectors, di- viding numbers with spaces (or equivalently with commas), if we want to concatenate them orizzontally (row vector) and by semicolumns, if we want to concatenate them vertically (column vector): 1 row_vec = [10, 11, 12, 13, 14]; 2…
First page of the document.