Informazioni sul documento
- Università
- Politecnico di Milano
- Corso di laurea
- Computer Engineering
- Materia
- Machine Learning
- Classificazione
- Esercizi · Divisi per argomento
- Formato originale
- Testo
- Testo ricercabile
Divisi per argomento di Machine Learning per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.
Divisi per argomento di Machine Learning per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.
Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.
Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.
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…
Prima pagina del documento.