# sequenze

n = zeros (1,N)

genera un vettore riga di N zeri

octave:1> n=zeros(1,10)

n =

0 0 0 0 0 0 0 0 0 0

n = ones (1,N)

genera un vettore riga di N uno

octave:2> m=ones(1,10)

m =

1 1 1 1 1 1 1 1 1 1

octave:3> stem(m); xlabel('m'); ylabel('x(m)')

sequenza esponenziale reale

octave:4> n=[0:10]; x=(0.8).^n

x =

1.00000 0.80000 0.64000 0.51200 0.40960 0.32768 0.26214 0.20972 0.16777 0.13422 0.10737

sequenza esponenziale complessa

octave:5> n=[0:10]; x=exp((5+6j)*n)

x =

Columns 1 through 4:

1.0000e+00 + 0.0000e+00i 1.4250e+02 - 4.1469e+01i 1.8587e+04 - 1.1819e+04i 2.1586e+06 - 2.4550e+06i

Columns 5 through 8:

2.0580e+08 - 4.3936e+08i 1.1107e+10 - 7.1143e+10i -1.3675e+12 - 1.0599e+13i -6.3438e+14 - 1.4536e+15i

Columns 9 through 11:

-1.5068e+17 - 1.8084e+17i -2.8971e+19 - 1.9521e+19i -4.9380e+21 - 1.5804e+21i

sequenza sinusoidale

octave:6> m=[0:10]; x = 5*cos(0.2*pi*m+pi/6) + 3*sin(0.1*pi*m)

x =

4.33013 2.96073 0.72380 -1.28867 -2.11944 -1.33013 0.81949 3.46661 5.47908 5.89966 4.33013

octave:7> stem(m,x,"*")