practica 2-control i

9

Click here to load reader

Upload: angietalavera

Post on 16-Apr-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Practica 2-Control i

UNIVERSIDAD CATÓLICA DE SANTA MARIA

FACULTAD DE CIENCIAS FÍSICAS Y FORMALES

PROGRAMA PROFESIONAL DE INGENIERÍA ELECTRÓNICA

SEGUNDA PRÁCTICA

“APLICACIONES ESPECIALES DE MATRICES Y

OPERACIONES ESCALARES ”

CONTROL AUTOMATICO I

ANGIE ISABEL TALAVERA HERRERA

AREQUIPA – PERU2014

Page 2: Practica 2-Control i

APLICACIONES ESPECIALES DE MATRICES Y

OPERACIONES ESCALARES

1.-

>> A=[3 6 4;5 1 0;7 2 3]

A =

3 6 4

5 1 0

7 2 3

>> B=[4 0 1;5 5 6;7 8 6]

B =

4 0 1

5 5 6

7 8 6

>> Pi=A.*B

Pi =

12 0 4

25 5 0

49 16 18

2.-

>> P=A*B

P =

Page 3: Practica 2-Control i

70 62 63

25 5 11

59 34 37

3.-

>> A=[2 -2 7 4;9 -2 3 4;5 1 -1 2;12 3 5 -2];

>> B=[5 0 -3 -1];

>> B/A

ans =

-0.8848 0.8337 -0.3238 0.0738

4.-

A)

>> U=[3 -1 6];

>> V=[-1 -2 5];

>> pi_=sum(U.*V)

pi_ =

29

>> d=sqrt(sum((U-V).^2))

d =

4.2426

B)

>> U=[1 3 0];

>> V=[-3 11 2];

>> pi_=sum(U.*V)

Page 4: Practica 2-Control i

pi_ =

30

>> d=sqrt(sum((U-V).^2))

d =

9.1652

5.-

>> a=[1 -2 6 12 0.3 0.8];

>> b=[1 5 21 8 -5 3^1/2];

>> X=-b./a

X =

Columns 1 through 4

-1.0000 2.5000 -3.5000 -0.6667

Columns 5 through 6

16.6667 -1.8750

6.-

>> help mod

mod Modulus after division.

mod(x,y) is x - n.*y where n = floor(x./y) if y ~= 0. If y is not an

integer and the quotient x./y is within roundoff error of an integer,

then n is that integer. The inputs x and y must be real arrays of the

same size, or real scalars.

The statement "x and y are congruent mod m" means mod(x,m) == mod(y,m).

Page 5: Practica 2-Control i

By convention:

mod(x,0) is x.

mod(x,x) is 0.

mod(x,y), for x~=y and y~=0, has the same sign as y.

Note: REM(x,y), for x~=y and y~=0, has the same sign as x.

mod(x,y) and REM(x,y) are equal if x and y have the same sign, but

differ by y if x and y have different signs.

See also rem.

Overloaded methods:

codistributed/mod

gpuArray/mod

sym/mod

Reference page in Help browser

doc mod

>> x=[1 6 8 23 46 89];

>> mod(x,4)

ans =

1 2 0 3 2 1

7.-

>> x=-1+2*j;

Page 6: Practica 2-Control i

>> y=-25+2*j;

>> z=2*j;

>> x+y

ans =

-26.0000 + 4.0000i

>> x-z

ans =

-1

>> (x+y)*z

ans =

-8.0000 -52.0000i

>> abs(x)

ans =

2.2361

>> 1/y

ans =

-0.0397 - 0.0032i

>> z^2

ans =

-4

>> log10(x)

Page 7: Practica 2-Control i

ans =

0.3495 + 0.8835i

>> exp(y)

ans =

-5.7794e-12 + 1.2628e-11i

>> abs(x/y)

ans =

0.0892

>> log(x)

ans =

0.8047 + 2.0344i

8.-

>> a=[1 3 -3];

>> b=[3^1/2 3 5];

>> m=sqrt(a)

m =

Columns 1 through 2

1.0000 + 0.0000i 1.7321 + 0.0000i

Column 3

0.0000 + 1.7321i

>> f=atan(1./b)

Page 8: Practica 2-Control i

f =

0.5880 0.3218 0.1974

>> [x,y]=pol2cart(m,f)

x =

0.3177 -0.0517 0.5753

y =

Columns 1 through 2

0.4948 + 0.0000i 0.3176 + 0.0000i

Column 3

0.0000 + 0.5404i