Comandi Matlab (senza commento)

Alcuni comandi

• clc
• clear
• clear x
• close all
• close(H)
• whos
• save filename
• load filename

Matrici e vettori

• x(:)
• x(j:end)
• x(2:5)
• x(j,:)
• x(:,j)
• diag(x)
• [A, B]
• [A;B]

Funzioni built-in e costanti

• abs(x)
• pi
• inf

                                              • eps
                                              • 1e6
                                              • sum(x)
                                              • prod(x)
                                              • round/ceil/fix/floor
                                              • sqrt,log,exp,max,min
                                              • asin,acos

Operatori logici

                                              • &&
                                              • &
                                              • ||
                                              • I

•

                                              • ==
                                              • =
                                              • <,>,>=,<=

Generazione di variabili

                                              • j:k
                                              • j:i:k
                                              • linspace(a,b,n)
                                              • ones(m,n)

                                                                                             • zeros(m,n)

Operazioni standard matrici vettori

                                                                                             • x=[1 2 3]
                                                                                             • x=[1; 2; 3]
                                                                                             • x=[1 2; 3 4]
                                                                                             • x(2)=4
                                                                                             • x.*y
                                                                                             • x./y
                                                                                             • x+y
                                                                                             • x-y
                                                                                             • A^n
                                                                                             • A.^n
                                                                                             • A'
                                                                                             • inv(A)
                                                                                             • size(x)
                                                                                             • eye(n)
                                                                                             • sort(x)
                                                                                             • eig(A)
                                                                                             • find(x > 5)

pagina 3