esercitazione 1: introduzione a...
TRANSCRIPT
![Page 1: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/1.jpg)
Laboratorio di Immagini
Esercitazione 1:
Introduzione a MATLAB
Mauro Zucchelli09/03/2016
![Page 2: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/2.jpg)
MATLAB
Cos’è MATLAB?
![Page 3: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/3.jpg)
MATLAB
Cos’è MATLAB?
● MATLAB non è un linguaggio di programmazione
![Page 4: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/4.jpg)
MATLAB
Cos’è MATLAB?
● MATLAB non è un linguaggio di programmazione
● MATLAB è un ambiente per il calcolo numerico, al cui
interno contiene un linguaggio di programmazione
proprietario
![Page 5: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/5.jpg)
MATLAB
Cos’è MATLAB?
● MATLAB non è un linguaggio di programmazione
● MATLAB è un ambiente per il calcolo numerico, al cui
interno contiene un linguaggio di programmazione
proprietario
● MATLAB è disponibile sia per sistemi Unix (Mac Os e
Linux) sia per Windows
![Page 6: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/6.jpg)
MATLAB
● MATLAB è la contrazione delle parole MATrix
LABoratory
![Page 7: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/7.jpg)
MATLAB
● MATLAB è la contrazione delle parole MATrix
LABoratory
● Come si evince dal nome, MATLAB è stato progettato
per il calcolo matriciale ed è particolarmente efficiente
nello svolgimento di questi calcoli
![Page 8: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/8.jpg)
L’interfaccia di MATLAB
![Page 9: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/9.jpg)
L’interfaccia di MATLAB
COMMAND WINDOW
![Page 10: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/10.jpg)
L’interfaccia di MATLAB
WORKSPACE
![Page 11: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/11.jpg)
L’interfaccia di MATLAB
COMMAND HISTORY
![Page 12: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/12.jpg)
MATLAB: comandi base
Dichiarazione di una variabile:
Le variabili in MATLAB non vanno dichiarate con il “tipo”
![Page 13: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/13.jpg)
MATLAB: comandi base
MATLAB è tipizzato implicitamente (a volte è più un problema che un vantaggio)
![Page 14: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/14.jpg)
MATLAB: comandi base
La stessa variabile può essere riciclata
![Page 15: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/15.jpg)
MATLAB: comandi base
Operazioni base:
![Page 16: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/16.jpg)
MATLAB: comandi base
Operazioni base:
Il punto e virgola sopprime l’output!
![Page 17: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/17.jpg)
MATLAB: comandi base
Costrutto “if”
![Page 18: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/18.jpg)
MATLAB: comandi base
Costrutto “for”
![Page 19: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/19.jpg)
MATLAB: array
In MATLAB ci sono vari modi per dichiarare un array
![Page 20: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/20.jpg)
MATLAB: array
● In MATLAB gli array partono da 1● Per accedere si usano le parentesi tonde
![Page 21: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/21.jpg)
MATLAB: array
● L’operatore “:” permette di accedere a più valori
![Page 22: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/22.jpg)
MATLAB: array
● Operazioni tra array (controllate la dimensione)
![Page 23: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/23.jpg)
MATLAB: array
● L’apice “traspone” gli array (e le matrici)
![Page 24: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/24.jpg)
MATLAB: array
● L’operatore ‘*’ di default indica il prodotto vettoriale!
1 X 3 * 3 X 1 = 1 X 1
3 X 1 * 1 X 3 = 3 X 3
![Page 25: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/25.jpg)
MATLAB: array
● Usate “ .* ” per il prodotto tra elementi
![Page 26: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/26.jpg)
MATLAB: matrici
![Page 27: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/27.jpg)
MATLAB: matrici
● Per MATLAB le matrici funzionano esattamente come gli array
● Di fatto gli array sono matrici 1XN (o NX1 )
![Page 28: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/28.jpg)
MATLAB: matrici
Vale sempre la regola del prodotto: l’operatore “ * “ indica il prodotto di matrici.
![Page 29: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/29.jpg)
MATLAB: comandi utili
● il comando “length” ritorna la lunghezza di un vettore o il numero di righe di una matrice
● Il comando “size” ritorna il numero di righe e colonne
![Page 30: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/30.jpg)
MATLAB: comandi utili
![Page 31: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/31.jpg)
MATLAB: comandi utili
MATLAB ha già implementato praticamente tutte le funzioni matematiche
![Page 32: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/32.jpg)
MATLAB: comandi utili
MATLAB ha già implementato praticamente tutte le funzioni matematiche
![Page 33: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/33.jpg)
MATLAB: funzioni
In MATLAB possiamo definire le nostre funzioni in file con l’estensione .m
![Page 34: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/34.jpg)
MATLAB: funzioni
In MATLAB possiamo definire le nostre funzioni in file con l’estensione .m
STESSO NOME
![Page 35: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/35.jpg)
MATLAB: funzioni
In MATLAB possiamo definire le nostre funzioni in file con l’estensione .m
RETURN IMPLICITO
![Page 36: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/36.jpg)
MATLAB: attenzione
MATLAB è super-ottimizzato per le operazioni matriciali, non usiamo i clicli se non strettamente necessario!
![Page 37: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/37.jpg)
MATLAB: attenzione
MATLAB è super-ottimizzato per le operazioni matriciali, non usiamo i clicli se non strettamente necessario!
La funzione sum di MATLAB è 72 volte più veloce di my_sum
![Page 38: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/38.jpg)
MATLAB: plot
![Page 39: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/39.jpg)
MATLAB: plot
![Page 40: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/40.jpg)
MATLAB: multiple plots: “hold on”
![Page 41: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/41.jpg)
MATLAB: multiple plots: “subplot”
![Page 42: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/42.jpg)
MATLAB: histograms
![Page 43: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/43.jpg)
MATLAB: histograms
![Page 44: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/44.jpg)
MATLAB
LE IMMAGINI
![Page 45: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/45.jpg)
MATLAB: le immagini
● MATLAB vede le immagini come matrici:
○ Immagini in bianco e nero (scala di grigi) come
matrici NXM;
○ Immagini a colori come matrici NXMX3 (RGB);
![Page 46: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/46.jpg)
MATLAB: le immagini
● MATLAB vede le immagini come matrici:
○ Immagini in bianco e nero (scala di grigi) come
matrici NXM;
○ Immagini a colori come matrici NXMX3 (RGB);
![Page 47: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/47.jpg)
MATLAB: le immagini
![Page 48: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/48.jpg)
MATLAB: le immagini
![Page 49: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/49.jpg)
MATLAB: le immagini
![Page 50: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/50.jpg)
MATLAB: le immagini
![Page 51: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/51.jpg)
MATLAB: le immagini
![Page 52: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/52.jpg)
MATLAB: le immagini
![Page 53: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/53.jpg)
MATLAB: compiti per oggi
Disegnare in una figure 4 immagini 512X512
rappresentanti:
● Un quadrato rosso su sfondo bianco
● Un quadrato blu su sfondo nero
● Un quadrato verde su sfondo nero
● Un quadrato nero su sfondo giallo
![Page 54: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/54.jpg)
MATLAB: compiti per oggi
![Page 55: Esercitazione 1: Introduzione a MATLABprofs.scienze.univr.it/~zucchelli/Esercitazione_1/Es_lab_img_01.pdf · Introduzione a MATLAB Mauro Zucchelli 09/03/2016. MATLAB Cos’è MATLAB?](https://reader030.vdocuments.site/reader030/viewer/2022021810/5c693e8e09d3f27c028ccc76/html5/thumbnails/55.jpg)
MATLAB: compiti per oggi