Vous êtes sur la page 1sur 25

Universidad Nacional de San Agustn

Facultad de ingenieras de produccin y


servicios
Escuela profesional de ingeniera
elctrica

Curso:
LABORATORIO DE CONTROL 1

LABORATORIO N 3

APELLIDOS: ENRIQUEZ CHOQUE


NOMBRES: DAVID NAZARIO

2013
FUNCIONES MATEMATICAS ELEMENTALES

Sen(x): seno del ngulo en radianes


En el lenguaje matlab seria sin (x)

Funcin impar rango[-1,1] dominio=R periodo =2pi

>> x=-pi:0.01:pi;

>> plot(x,sin(x)), grid on

Ejemplo

sin(pi/6)

ans =

0.5000=1/2

Cos(x): coseno del ngulo en radianes


En el lenguaje matlab seria cos(x)

Funcin par rango[-1,1] dominio=R periodo=2pi

>> x=-pi:0.01:pi;

>> plot(x,cos(x)), grid on

Ejemplo :

>> cos(pi/6)

ans =

0.8660=3^(1/2)/2

Tan(x): tangent del angulo en radianes


Funcin impar rango=R dominio=R-{npi+pi/2}

x = (-pi/2)+0.01:0.01:(pi/2)-0.01;

plot(x,tan(x)), grid on

ejemplo:

>> tan(pi/6)
ans =

0.5774

Arcosen(x): arco seno del ngulo en radianes


En el lenguaje matlab seria asin(X)

Dominio=[-1,1] rango=[-pi/2,pi/2]

x = -1:.01:1;
plot(x,asin(x)), grid on

ejemplo:

>> asin(pi/6)

ans =

0.5511

Arcocos(x): arco coseno del ngulo en radianes

En el lenguaje matlab seria ascos(X)

Dominio=[-1,1] rango=[0,pi]

x = -1:.05:1;

plot(x,acos(x)), grid on

ejemplo:

>> acos(pi/6)

ans =

1.0197
Arcotan(x): devuelve un angulo entre (pi/2 y pi/2)

En el lenguaje matlab seria atan(x)

Dominio=R rango=[pi/2,-pi/2]

Ejemplo:

x = -20:0.01:20;

plot(x,atan(x)), grid on

>> atan(pi/6)

ans =

0.4823 esta entre [-pi/2 pi/2]


Sinh(x) : seno hiperblico

Dominio =R rango=R

Ejemplo:

x = -5:0.01:5;

plot(x,sinh(x)), grid on

cosh(x) :coseno hiperbolico


Dominio =R rango=[1,inf

Ejemplo:

x = 1:pi/40:pi;

plot(x,cosh(x)), grid on

tanh(x): tangente hiperbolica

Dominio =R rango=-1,1

Ejemplo:

x = -5:0.01:5;

plot(x,tanh(x)), grid on

asinh(x): arcoseno hiperbolico

ejemplo:

x = -5:.01:5;

plot(x,asinh(x)), grid on

sqrt(x): raiz cuadrada

ejemplo:

>> sqrt(64)

ans =

8
Round(x): redondea a el entero mas prximo

Ejemplo:

>> round(12.3)

ans =

12
x=[0:1:10]

x=

0 1 2 3 4 5 6 7 8 9 10

log(x)

ans =

Columns 1 through 8

-Inf 0 0.6931 1.0986 1.3863 1.6094 1.7918 1.9459

Columns 9 through 11
2.0794 2.1972 2.3026

log10(x)

ans =

Columns 1 through 8

-Inf 0 0.3010 0.4771 0.6021 0.6990 0.7782 0.8451

Columns 9 through 11

0.9031 0.9542 1.0000

exp(x)

ans =

1.0e+004 *

Columns 1 through 8

0.0001 0.0003 0.0007 0.0020 0.0055 0.0148 0.0403 0.1097

Columns 9 through 11

0.2981 0.8103 2.2026


sqrt(x)

ans =

Columns 1 through 8

0 1.0000 1.4142 1.7321 2.0000 2.2361 2.4495 2.6458

Columns 9 through 11

2.8284 3.0000 3.1623

clear
x=[-5:1:5]

x=

-5 -4 -3 -2 -1 0 1 2 3 4 5

sign(x)

ans =

-1 -1 -1 -1 -1 0 1 1 1 1 1
clear

clc

x=[0:1:10]

x=

0 1 2 3 4 5 6 7 8 9 10

y=2

y=

rem(x,y)

ans =

0 1 0 1 0 1 0 1 0 1 0

mod(x,y)

ans =

0 1 0 1 0 1 0 1 0 1 0

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).

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 <a href="matlab:help rem">rem</a>.

Overloaded methods:

<a href="matlab:help codistributed/mod">codistributed/mod</a>

<a href="matlab:help sym/mod">sym/mod</a>

Reference page in Help browser

<a href="matlab:doc mod">doc mod</a>

clear
clc

x=[1:.1:10]

x=

Columns 1 through 8

1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000

Columns 9 through 16

1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 2.4000 2.5000

Columns 17 through 24

2.6000 2.7000 2.8000 2.9000 3.0000 3.1000 3.2000 3.3000

Columns 25 through 32

3.4000 3.5000 3.6000 3.7000 3.8000 3.9000 4.0000 4.1000

Columns 33 through 40

4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 4.8000 4.9000

Columns 41 through 48
5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000

Columns 49 through 56

5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000

Columns 57 through 64

6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 7.2000 7.3000

Columns 65 through 72

7.4000 7.5000 7.6000 7.7000 7.8000 7.9000 8.0000 8.1000

Columns 73 through 80

8.2000 8.3000 8.4000 8.5000 8.6000 8.7000 8.8000 8.9000

Columns 81 through 88

9.0000 9.1000 9.2000 9.3000 9.4000 9.5000 9.6000 9.7000

Columns 89 through 91

9.8000 9.9000 10.0000

Round: redondea hacia el entero mas prximo


round(x)

ans =

Columns 1 through 14

1 1 1 1 1 2 2 2 2 2 2 2 2 2

Columns 15 through 28

2 3 3 3 3 3 3 3 3 3 3 4 4 4

Columns 29 through 42

4 4 4 4 4 4 4 5 5 5 5 5 5 5

Columns 43 through 56

5 5 5 6 6 6 6 6 6 6 6 6 6 7

Columns 57 through 70

7 7 7 7 7 7 7 7 7 8 8 8 8 8

Columns 71 through 84

8 8 8 8 8 9 9 9 9 9 9 9 9 9
Columns 85 through 91

9 10 10 10 10 10 10

Fix: redondea hacia el entero ms prximo a 0

fix(x)

ans =

Columns 1 through 14

1 1 1 1 1 1 1 1 1 1 2 2 2 2

Columns 15 through 28

2 2 2 2 2 2 3 3 3 3 3 3 3 3

Columns 29 through 42

3 3 4 4 4 4 4 4 4 4 4 4 5 5

Columns 43 through 56

5 5 5 5 5 5 5 5 6 6 6 6 6 6

Columns 57 through 70
6 6 6 6 7 7 7 7 7 7 7 7 7 7

Columns 71 through 84

8 8 8 8 8 8 8 8 8 8 9 9 9 9

Columns 85 through 91

9 9 9 9 9 9 10

clear

clc

x=[-5:0.4:5]

x=

Columns 1 through 8

-5.0000 -4.6000 -4.2000 -3.8000 -3.4000 -3.0000 -2.6000 -2.2000

Columns 9 through 16

-1.8000 -1.4000 -1.0000 -0.6000 -0.2000 0.2000 0.6000 1.0000

Columns 17 through 24

1.4000 1.8000 2.2000 2.6000 3.0000 3.4000 3.8000 4.2000


Columns 25 through 26

4.6000 5.0000

Floor: redondea hacia el entero mas prximo hacia menos infinito

floor(x)

ans =

Columns 1 through 14

-5 -5 -5 -4 -4 -3 -3 -3 -2 -2 -1 -1 -1 0

Columns 15 through 26

0 1 1 1 2 2 3 3 3 4 4 5

diary off

ceil: redondea hacia el entero mas prximo hacia el ms positivo

ceil(x)

ans =

Columns 1 through 14

-5 -4 -4 -3 -3 -3 -2 -2 -1 -1 -1 0 0 1
Columns 15 through 26

1 1 2 2 3 3 3 4 4 5 5 5

clear

clc

gcd: halla el mximo como un divisor

[g,c,d] = gcd(30,56)

g=

c = -13

d=

diary off

uiopen('C:\Users\jorge\tarea_GutierrezGamio',1)

[g,c,d] = gcd(20,30)

g=

10

c=

-1

d=

Lcm: halla el minimo comun multiplo


doc lcm

lcm(24,40)

ans =
120

Real: calcula la parte real

real(12+4i)

ans =

12

Imag: calcula la parte imaginaria

imag(12+4i)

ans =

Abs: nos da el valor absoluto

abs(12+4i)

ans =

12.6491

doc angle

clc

clear

Z = [ 1 - 1i 2 + 1i 3 - 1i; 1 + 2i 2 - 2i 3 + 2i; 1 - 3i 2 + 3i 3 - 3i]

Z=
1.0000 - 1.0000i 2.0000 + 1.0000i 3.0000 - 1.0000i

1.0000 + 2.0000i 2.0000 - 2.0000i 3.0000 + 2.0000i

1.0000 - 3.0000i 2.0000 + 3.0000i 3.0000 - 3.0000i

Angle: nos da el angulo en cada fase

doc angle

angle(Z)

ans =

-0.7854 0.4636 -0.3218

1.1071 -0.7854 0.5880

-1.2490 0.9828 -0.7854

Vous aimerez peut-être aussi