%%% REGISTRAZIONE  DELLA  LEZIONE  INTRODUTTIVA
%%% ALL'USO DI MATLAB - GIOVEDI' 15 MAGGIO 2003 

diary off
A=[1 2 3
4 5 6
7 8 9]

A =

     1     2     3
     4     5     6
     7     8     9

A=[1 2 3; 4 5 6; 7 8 9]

A =

     1     2     3
     4     5     6
     7     8     9

% Commento
A=[1 2 3; 4 5 6; 7 8 9] % matrice A

A =

     1     2     3
     4     5     6
     7     8     9

x=[10 20 30 ...
40 50 60 70]

x =

  Columns 1 through 4 

    10    20    30    40

  Columns 5 through 7 

    50    60    70

I=eye(5,5)

I =

  Columns 1 through 4 

     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0

  Column 5 

     0
     0
     0
     0
     1

I=eye(50,50)

I =

  Columns 1 through 4 

     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 5 through 8 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 9 through 12 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 13 through 16 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 17 through 20 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 21 through 24 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 25 through 28 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 29 through 32 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 33 through 36 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 37 through 40 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 41 through 44 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0

  Columns 45 through 48 

     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     0     0     0     0
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1
     0     0     0     0
     0     0     0     0

  Columns 49 through 50 

     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     1     0
     0     1

I=eye(50,50);
size(I)

ans =

    50    50

[r c]=size(I)

r =

    50


c =

    50

U=ones(4,3)

U =

     1     1     1
     1     1     1
     1     1     1
     1     1     1

Z=zeros(2,5)

Z =

  Columns 1 through 4 

     0     0     0     0
     0     0     0     0

  Column 5 

     0
     0

x=zeros(1,4)

x =

     0     0     0     0

y=zeros(7,1)

y =

     0
     0
     0
     0
     0
     0
     0

A

A =

     1     2     3
     4     5     6
     7     8     9

A(2,2)

ans =

     5

A(1,:)

ans =

     1     2     3

A(:,1)

ans =

     1
     4
     7

A(:,[2 3])

ans =

     2     3
     5     6
     8     9

A

A =

     1     2     3
     4     5     6
     7     8     9

Y=[20 30 40]

Y =

    20    30    40

B=[A;Y]

B =

     1     2     3
     4     5     6
     7     8     9
    20    30    40

Y=[20 30 40 50]

Y =

    20    30    40    50

B=[A;Y]
??? Error using ==> vertcat
All rows in the bracketed expression must have the same 
number of columns.

A

A =

     1     2     3
     4     5     6
     7     8     9

A'

ans =

     1     4     7
     2     5     8
     3     6     9

T=ans

T =

     1     4     7
     2     5     8
     3     6     9

[1 2 3 4]'

ans =

     1
     2
     3
     4

c=[1 2 3 4]

c =

     1     2     3     4

c=c(:)

c =

     1
     2
     3
     4

c=c(:)

c =

     1
     2
     3
     4

c'

ans =

     1     2     3     4

[1 2 3;4 5 6]+[3 3 3;3 3 3]

ans =

     4     5     6
     7     8     9

[1 2 3;4 5 6]+[3 3 3 4;3 3 3 4]
??? Error using ==> +
Matrix dimensions must agree.

[1 2 3]-5

ans =

    -4    -3    -2

[1 2;3 4;5 6]*[4 4; 5 5]

ans =

    14    14
    32    32
    50    50

[1 2 3 4 5 6].*[7 8 9 10 11 12]

ans =

  Columns 1 through 4 

     7    16    27    40

  Columns 5 through 6 

    55    72

A

A =

     1     2     3
     4     5     6
     7     8     9

M=A.^2

M =

     1     4     9
    16    25    36
    49    64    81

M=A.^3

M =

     1     8    27
    64   125   216
   343   512   729

clear A
clear A B I
clear all
A=[1 2 0; 0 4 2; 2 2 8];
det(A)

ans =

    36

rank(A)

ans =

     3

inv(A)

ans =

  Columns 1 through 2 

    0.7778   -0.4444
    0.1111    0.2222
   -0.2222    0.0556

  Column 3 

    0.1111
   -0.0556
    0.1111

A

A =

     1     2     0
     0     4     2
     2     2     8

b=[1 1 1]';
x=inv(A)*b

x =

    0.4444
    0.2778
   -0.0556

x=A\b

x =

    0.4444
    0.2778
   -0.0556

x=A/b
??? Error using ==> /
Matrix dimensions must agree.

b/A
??? Error using ==> /
Matrix dimensions must agree.

b'/A

ans =

  Columns 1 through 2 

    0.6667   -0.1667

  Column 3 

    0.1667

[1 2 3 4 5 6]./[7 8 9 10 11 12]

ans =

  Columns 1 through 2 

    0.1429    0.2500

  Columns 3 through 4 

    0.3333    0.4000

  Columns 5 through 6 

    0.4545    0.5000

[1 2 3 4 5 6]./[7 8 9 10 11]
??? Error using ==> ./
Matrix dimensions must agree.

x

x =

    0.4444
    0.2778
   -0.0556

mean(x)

ans =

    0.2222

mean(A)

ans =

  Columns 1 through 2 

    1.0000    2.6667

  Column 3 

    3.3333

A

A =

     1     2     0
     0     4     2
     2     2     8

clear x
x=[10 -20 30 -30]';
x>0

ans =

     1
     0
     1
     0

x(x>0)

ans =

    10
    30

ind=find(x>0)

ind =

     1
     3

x(ind)

ans =

    10
    30

a=6

a =

     6

a==6

ans =

     1

a==7

ans =

     0

b=12;
a==6 & b==12

ans =

     1

a==6 & b==13

ans =

     0

a==6 | b==12

ans =

     1

a==6 | b==13

ans =

     1

help not

 ~   Logical NOT.
    ~A is a matrix whose elements are 1's where A has zero
    elements, and 0's where A has non-zero elements.
 
    B = NOT(A) is called for the syntax '~A' when A is an object.

help

HELP topics:

matlab\general       -  General purpose commands.
matlab\ops           -  Operators and special characters.
matlab\lang          -  Programming language constructs.
matlab\elmat         -  Elementary matrices and matrix manipulation.
matlab\elfun         -  Elementary math functions.
matlab\specfun       -  Specialized math functions.
matlab\matfun        -  Matrix functions - numerical linear algebra.
matlab\datafun       -  Data analysis and Fourier transforms.
matlab\audio         -  Audio support.
matlab\polyfun       -  Interpolation and polynomials.
matlab\funfun        -  Function functions and ODE solvers.
matlab\sparfun       -  Sparse matrices.
matlab\graph2d       -  Two dimensional graphs.
matlab\graph3d       -  Three dimensional graphs.
matlab\specgraph     -  Specialized graphs.
matlab\graphics      -  Handle Graphics.
matlab\uitools       -  Graphical user interface tools.
matlab\strfun        -  Character strings.
matlab\iofun         -  File input/output.
matlab\timefun       -  Time and dates.
matlab\datatypes     -  Data types and structures.
matlab\verctrl       -  Version control.
matlab\winfun        -  Windows Operating System Interface Files (DDE/COM)
winfun\comcli        -  (No table of contents file)
matlab\demos         -  Examples and demonstrations.
toolbox\local        -  Preferences.
simulink\simulink    -  Simulink
simulink\blocks      -  Simulink block library.
simulink\components  -  Simulink components.
simulink\fixedandfloat -  (No table of contents file)
fixedandfloat\fxpdemos -  Fixed-Point Blockset Demos
fixedandfloat\obsolete -  Obsolete Fixed-Point Blockset
simulink\simdemos    -  Simulink 4 demonstrations and samples.
simdemos\aerospace   -  Simulink: Aerospace model demonstrations and samples.
simdemos\automotive  -  Simulink: Automotive model demonstrations and samples.
simdemos\simfeatures -  Simulink: Feature demonstrations and samples.
simdemos\simgeneral  -  Simulink: General model demonstrations and samples.
simdemos\simnew      -  Simulink: New features model demonstrations and samples.
simulink\dee         -  Differential Equation Editor
simulink\dastudio    -  (No table of contents file)
stateflow\stateflow  -  Stateflow
stateflow\sfdemos    -  Stateflow demonstrations and samples.
stateflow\coder      -  (No table of contents file)
comm\comm            -  Communications Toolbox.
comm\commdemos       -  Communications Toolbox Demonstrations.
comm\commobsolete    -  Archived MATLAB Files from Communications Toolbox Version 1.5.
control\control      -  Control System Toolbox.
control\ctrlguis     -  Control System Toolbox -- GUI support functions.
control\ctrlobsolete -  Control System Toolbox -- obsolete commands.
control\ctrlutil     -  (No table of contents file)
control\ctrldemos    -  Control System Toolbox -- Demos.
curvefit\curvefit    -  Curve Fitting Toolbox
curvefit\cftoolgui   -  (No table of contents file)
database\database    -  Database Toolbox.
database\dbdemos     -   Database Toolbox Demonstration Functions.
database\vqb         -  Visual Query Builder functions.
toolbox\fixpoint     -  Fixed-Point Blockset
fuzzy\fuzzy          -  Fuzzy Logic Toolbox.
fuzzy\fuzdemos       -  Fuzzy Logic Toolbox Demos.
images\images        -  Image Processing Toolbox.
images\imdemos       -  Image Processing Toolbox --- demos and sample images
toolbox\compiler     -  MATLAB Compiler
toolbox\rptgen       -  MATLAB Report Generator
mpc\mpccmds          -  Model Predictive Control Toolbox.
mpc\mpcdemos         -  Model Predictive Control Toolbox
mutools\commands     -  Mu-Analysis and Synthesis Toolbox.
mutools\subs         -  Mu-Analysis and Synthesis Toolbox.
nnet\nnet            -  Neural Network Toolbox.
nnet\nnutils         -  (No table of contents file)
nnet\nncontrol       -  Neural Network Toolbox Control System Functions.
nnet\nndemos         -  Neural Network Demonstrations.
nnet\nnobsolete      -  (No table of contents file)
toolbox\optim        -  Optimization Toolbox
toolbox\pde          -  Partial Differential Equation Toolbox.
toolbox\robust       -  Robust Control Toolbox.
toolbox\sb2sl        -  SB2SL (converts SystemBuild to Simulink)
signal\signal        -  Signal Processing Toolbox 
signal\sigtools      -  Filter Design & Analysis Tool (GUI)
signal\sptoolgui     -  Signal Processing Toolbox GUI
signal\sigdemos      -  Signal Processing Toolbox Demonstrations.
powersys\powersys    -  SimPowerSystems
powersys\powerdemo   -  SimPowerSystems Demos.
toolbox\splines      -  Spline Toolbox.
toolbox\stats        -  Statistics Toolbox
toolbox\symbolic     -  Symbolic Math Toolbox.
ident\ident          -  System Identification Toolbox.
ident\idobsolete     -  (No table of contents file)
ident\idguis         -  (No table of contents file)
ident\idutils        -  (No table of contents file)
ident\iddemos        -  (No table of contents file)
ident\idhelp         -  (No table of contents file)
wavelet\wavelet      -  Wavelet Toolbox
wavelet\wavedemo     -  Wavelet Toolbox Demonstrations.
MATLAB6p5\work       -  (No table of contents file)

For more help on directory/topic, type "help topic".
For command syntax information, type "help syntax".


help elmat

  Elementary matrices and matrix manipulation.
 
  Elementary matrices.
    zeros       - Zeros array.
    ones        - Ones array.
    eye         - Identity matrix.
    repmat      - Replicate and tile array.
    rand        - Uniformly distributed random numbers.
    randn       - Normally distributed random numbers.
    linspace    - Linearly spaced vector.
    logspace    - Logarithmically spaced vector.
    freqspace   - Frequency spacing for frequency response.
    meshgrid    - X and Y arrays for 3-D plots.
    :           - Regularly spaced vector and index into matrix.
 
  Basic array information.
    size        - Size of array.
    length      - Length of vector.
    ndims       - Number of dimensions.
    numel       - Number of elements.
    disp        - Display matrix or text.
    isempty     - True for empty array.
    isequal     - True if arrays are numerically equal.
    isequalwithequalnans - True if arrays are numerically equal.
    isnumeric   - True for numeric arrays.
    islogical   - True for logical array.
    logical     - Convert numeric values to logical.
 
  Matrix manipulation.
    cat         - Concatenate arrays.
    reshape     - Change size.
    diag        - Diagonal matrices and diagonals of matrix.
    blkdiag     - Block diagonal concatenation.
    tril        - Extract lower triangular part.
    triu        - Extract upper triangular part.
    fliplr      - Flip matrix in left/right direction.
    flipud      - Flip matrix in up/down direction.
    flipdim     - Flip matrix along specified dimension.
    rot90       - Rotate matrix 90 degrees.
    :           - Regularly spaced vector and index into matrix.
    find        - Find indices of nonzero elements.
    end         - Last index.
    sub2ind     - Linear index from multiple subscripts.
    ind2sub     - Multiple subscripts from linear index.
 
  Multi-dimensional array functions.
    ndgrid      - Generate arrays for N-D functions and interpolation.
    permute     - Permute array dimensions.
    ipermute    - Inverse permute array dimensions.
    shiftdim    - Shift dimensions.
    circshift   - Shift array circularly.
    squeeze     - Remove singleton dimensions.
 
  Special variables and constants.
    ans         - Most recent answer.
    eps         - Floating point relative accuracy.
    realmax     - Largest positive floating point number.
    realmin     - Smallest positive floating point number.
    pi          - 3.1415926535897....
    i, j        - Imaginary unit.
    inf         - Infinity.
    NaN         - Not-a-Number.
    isnan       - True for Not-a-Number.
    isinf       - True for infinite elements.
    isfinite    - True for finite elements.
    why         - Succinct answer.
 
  Specialized matrices.
    compan      - Companion matrix.
    gallery     - Higham test matrices.
    hadamard    - Hadamard matrix.
    hankel      - Hankel matrix.
    hilb        - Hilbert matrix.
    invhilb     - Inverse Hilbert matrix.
    magic       - Magic square.
    pascal      - Pascal matrix.
    rosser      - Classic symmetric eigenvalue test problem.
    toeplitz    - Toeplitz matrix.
    vander      - Vandermonde matrix.
    wilkinson   - Wilkinson's eigenvalue test matrix.

help eye

 EYE Identity matrix.
    EYE(N) is the N-by-N identity matrix.
 
    EYE(M,N) or EYE([M,N]) is an M-by-N matrix with 1's on
    the diagonal and zeros elsewhere.
 
    EYE(SIZE(A)) is the same size as A.
 
    See also ONES, ZEROS, RAND, RANDN.

help not

 ~   Logical NOT.
    ~A is a matrix whose elements are 1's where A has zero
    elements, and 0's where A has non-zero elements.
 
    B = NOT(A) is called for the syntax '~A' when A is an object.

~a

ans =

     0

a=0;
~a

ans =

     1

clear all
x=-20:20;
x

x =

  Columns 1 through 4 

   -20   -19   -18   -17

  Columns 5 through 8 

   -16   -15   -14   -13

  Columns 9 through 12 

   -12   -11   -10    -9

  Columns 13 through 16 

    -8    -7    -6    -5

  Columns 17 through 20 

    -4    -3    -2    -1

  Columns 21 through 24 

     0     1     2     3

  Columns 25 through 28 

     4     5     6     7

  Columns 29 through 32 

     8     9    10    11

  Columns 33 through 36 

    12    13    14    15

  Columns 37 through 40 

    16    17    18    19

  Column 41 

    20

x=-20:0.1:20;
y1=x;
y2=x.^2;
y3=x.^3;
y4=x.^4;
plot(x,y2)
plot(x,y2,'r')
plot(x,y2,'--')
plot(x,y2,'-.')
plot(x,y2,'-.r')
help plot

 PLOT   Linear plot. 
    PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
    then the vector is plotted versus the rows or columns of the matrix,
    whichever line up.  If X is a scalar and Y is a vector, length(Y)
    disconnected points are plotted.
 
    PLOT(Y) plots the columns of Y versus their index.
    If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)).
    In all other uses of PLOT, the imaginary part is ignored.
 
    Various line types, plot symbols and colors may be obtained with
    PLOT(X,Y,S) where S is a character string made from one element
    from any or all the following 3 columns:
 
           b     blue          .     point              -     solid
           g     green         o     circle             :     dotted
           r     red           x     x-mark             -.    dashdot 
           c     cyan          +     plus               --    dashed   
           m     magenta       *     star
           y     yellow        s     square
           k     black         d     diamond
                               v     triangle (down)
                               ^     triangle (up)
                               <     triangle (left)
                               >     triangle (right)
                               p     pentagram
                               h     hexagram
                          
    For example, PLOT(X,Y,'c+:') plots a cyan dotted line with a plus 
    at each data point; PLOT(X,Y,'bd') plots blue diamond at each data 
    point but does not draw any line.
 
    PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...) combines the plots defined by
    the (X,Y,S) triples, where the X's and Y's are vectors or matrices 
    and the S's are strings.  
 
    For example, PLOT(X,Y,'y-',X,Y,'go') plots the data twice, with a
    solid yellow line interpolating green circles at the data points.
 
    The PLOT command, if no color is specified, makes automatic use of
    the colors specified by the axes ColorOrder property.  The default
    ColorOrder is listed in the table above for color systems where the
    default is blue for one line, and for multiple lines, to cycle
    through the first six colors in the table.  For monochrome systems,
    PLOT cycles over the axes LineStyleOrder property.
 
    PLOT returns a column vector of handles to LINE objects, one
    handle per line. 
 
    The X,Y pairs, or X,Y,S triples, can be followed by 
    parameter/value pairs to specify additional properties 
    of the lines.
                                    
    See also SEMILOGX, SEMILOGY, LOGLOG, PLOTYY, GRID, CLF, CLC, TITLE,
    XLABEL, YLABEL, AXIS, AXES, HOLD, COLORDEF, LEGEND, SUBPLOT, STEM.

 Overloaded methods
    help cfit/plot.m
    help idmodel/plot.m
    help iddata/plot.m
    help ntree/plot.m
    help dtree/plot.m
    help wvtree/plot.m
    help rwvtree/plot.m
    help edwttree/plot.m

xlabel('asse delle variabili indipendenti')
ylabel('asse delle variabili dipendenti')
title('Parabola')
plot(x,y2,'b',x,y3,'r')
grid on
subplot(2,2,1),plot(x,y1)
subplot(2,2,2),plot(x,y2)
subplot(2,2,3),plot(x,y3)
subplot(2,2,4),plot(x,y4)
xlabel('Asse x')
subplot(2,2,1),title('Retta')
xlabel('Asse x')
save Paperino
clear all
load Paperino
edit
fschange('C:\MATLAB6p5\work\grafico.m');
clear grafico
fschange('C:\MATLAB6p5\work\grafico.m');
clear grafico
clear all
grafico
diary off
