Você está na página 1de 43

UNIVERSIDAD

NACIONAL PEDRO
RUIZ GALLO
Facultad de Ciencias Fsicas y
Matemticas

Escuela Profesional de Matemtica

EJERCICIOS EN MATLAB

Presentado por:
MIO CUEVA
PARDO SILVA
RIOS IPARRAGUIRRE
>> diary('01miocueva.txt')
>> diary('02pardosilva.txt')
>> diary('03riosiparraguirre.txt')
>> %PROBLEMAS PROPUESTOS
>>PARTE 1
>>??? Undefined function or method 'PARTE' for input arguments of type 'char'.

>>
>> ejercicio 1a
??? Undefined function or method 'ejercicio' for input arguments of type 'char'.

>> (35.7*64-(7^3))/(45+(5*(4^2)))

ans =

15.5344

>>
>>
>> ejercicio 1b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> (1.25*7*(6^2))+((3^7)/((9^3)-652))

ans =

343.4026

>>
>>
>>
>> ejercicio 2a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> ((2+7)^3)+((273^(2/3))/2)+((55^2)/3)

ans =

1.7584e+003

>>
>>
>> ejercicio 2b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> (2^3)+(7^3)+((273^3)/2)+(55^(2/3))

ans =

1.0174e+007

>>
>>
>> ejercicio 3a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> (((3^7)*(log(76)))/((7^3)+546))+(910^(1/3))
ans =

20.3444

>>
>>
>>
>> ejercicio 3b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> 43*(((250^(1/4))+23)^2)/(exp(45-(3^3)))

ans =

4.7658e-004

>>
>>
>>
>> ejercicio 4a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

((cos((5/6)*pi))^2)*sin(((7/8)*pi)^2)+((tan((pi/6)*log(8)))/sqrt(7))

ans =
1.4395

>> ejercicio 4b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> cos(((5/6)*pi)^2)*(sin((7/8)*pi))^2+((tan((pi/6)*log(8)))/(7*2.5))

ans =

0.2325

>>
>>
>>
>> ejercicio 5a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> x=13.5

x=

13.5000

>> x^3+5*(x^2)-(26.7*x)-52

ans =

2.9592e+003
>>
>>
>> ejercicio 5b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> x

x=

13.5000

>> (sqrt(14*(x^3)))/exp(3*x)

ans =

4.7823e-016

>>
>>
>> ejercicio 5c
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> x

x=

13.5000
>> log(abs((x^2)-(x^3)))

ans =

7.7311

>>
>>
>> ejercicio 6a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> x=9.6 ,z=8.1

x=

9.6000

z=

8.1000

>> x*(z^2)-(((2*z)/(3*x))^(3/5))

ans =

629.1479
>>
>>
>> ejercicio 6b
??? Undefined function or method ' ejercicio ' for input arguments of type
'char'.

>> x,z

x=

9.6000

z=

8.1000

>> (443*z/2*(x^3))+(exp(-x*z)/(x+z))

ans =

1.5873e+006

>>
>>
>> ejercicio 7a
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> a=15.62 ,b=-7.08, c=62.5 ,d=0.5*(a*b-c)


a=

15.6200

b=

-7.0800

c=

62.5000

d=

-86.5448

>> a+(a*b/c)*(((a+d)^2)/sqrt(abs(a*b)))

ans =

-830.7755

>>
>>
>>
>>
>> ejercicio 7b
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> (d*exp(d/2))+(((a*d+c*d)/((20/a)+(30/b)))/(a+b+c+d))

ans =

-147.4700

>>
>>
>> ejercicio 8
??? Undefined function or method 'ejercicio' for input arguments of type
'char'.

>> v=350, r=(v/((4/3))*pi)^(1/3)

v=

350

r=

9.3776

>> r
r=

9.3776

>> area=4*pi*(r^2)

area =

1.1051e+003

>>

>> area=4*pi*(r^2)

area =

1.1051e+003

>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ejercicio 9a

??? Undefined function or method ' ejercicio ' for input arguments of type 'char'.

>> x=(5/24)*pi

x=

0.6545

>> lado1=sin(2*x)

lado1 =

0.9659

>> lado2=2*sin(x)*cos(x)

lado2 =

0.9659

>>

>>

>>

>>

>>

>>

>>
>> ejercicio 9b

??? Undefined function or method ' ejercicio ' for input arguments of type 'char'.

>> x

x=

0.6545

>> lado1=cos(x/2)

lado1 =

0.9469

>> lado2=sqrt(1+cos(x)/2)

lado2 =

1.1818

>> lado2=sqrt((1+cos(x))/2)

lado2 =

0.9469

>>
>>

>> ejercicio 10a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> x=(3/17)*pi

x=

0.5544

>> lado1=tan(2*x)

lado1 =

2.0083

>> lado2=(2*tan(x))/(1-(tan(x))^2)

lado2 =

2.0083

>>

>>

>>

>>

>>
>> ejercicio 10b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> x

x=

0.5544

>> lado1=tan(x/2)

lado1 =

0.2845

>> lado2=sqrt((1-cos(x))/(1+cos(x)))

lado2 =

0.2845

>>

>>

>>

>>
>> ejercicio 11b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'

>> alfa=(5/9)*pi, beta=pi/7

alfa =

1.7453

beta =

0.4488

>> lado1=cos(alfa)-cos(beta)

lado1 =

-1.0746

>> lado2=2*sin(0.5*(alfa+beta))*sin(0.5*(beta-alfa))

lado2 =

-1.0746

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>
>> ejercicio 12a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> a=11, c=21, b=sqrt((c^2)-(a^2))

a=

11

c=

21

b=

17.8885

>>

>>

>>

>>

>>
>> ejercicio 12b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> a,b,c

a=

11

b=

17.8885

c=

21

>> alfa=acos(((a^2)+(b^2)-(c^2))/(2*a*b))

alfa =

1.5708

>>

>>
>> ejercicio 13a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> a=18, b=35, b=sqrt((a^2)+(b^2))

a=

18

b=

35

b=

39.3573

>>

>>

>>

>>

>>

>>
>> ejercicio 13b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> a,b,c

a=

18

b=

39.3573

c=

21

>> alfa=acos(((a^2)+(b^2)-(c^2))/(2*a*b))

alfa =

0 + 0.1460i

>>

>>
>> ejercicio 14

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A=3, B=5,C=-6,X=2,Y=-3

A=

B=

C=

-6

X=

Y=

-3
>> d=(abs((A*X)+(B*Y)+C))/(sqrt((A^2)+(B^2)))

d=

2.5725

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>
>> PARTE 2

??? Undefined function or method 'PARTE' for input arguments of type 'char'.

>>

>>

>> EJERCICIO 1

??? Undefined function or method 'EJERCICIO' for input arguments of type

'char'.

>> v= [32 4 81 exp(2.5) cos(pi/3) 14.12]

v=

32.0000 4.0000 81.0000 12.1825 0.5000 14.1200

>> EJERCICIO 2

??? Undefined function or method 'EJERCICIO' for input arguments of type

'char'.

>> w=[55;14;log(51);987;0;5*sin(2.5*pi)]

w=

55.0000

14.0000

3.9318

987.0000

5.0000
>> ejercicio 3

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> v1=1:2:33

v1 =

Columns 1 through 12

1 3 5 7 9 11 13 15 17 19 21 23

Columns 13 through 17

25 27 29 31 33

>>

>>

>> ejercicio 4

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> V2=[15:-5:-25]

V2 =

15 10 5 0 -5 -10 -15 -20 -25


>> ejercicio 5

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> v=linspace(7,40,15)

v=

Columns 1 through 7

7.0000 9.3571 11.7143 14.0714 16.4286 18.7857 21.1429

Columns 8 through 14

23.5000 25.8571 28.2143 30.5714 32.9286 35.2857 37.6429

Column 15

40.0000

>>

>>

>>

>>

>>

>>

>>

>>
>> ejercicio 6

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> v=linspace(-1,-15,12)

v=

Columns 1 through 7

-1.0000 -2.2727 -3.5455 -4.8182 -6.0909 -7.3636 -8.6364

Columns 8 through 12

-9.9091 -11.1818 -12.4545 -13.7273 -15.0000

>>

>>

>>

>>

>>

>>

>> ejercicio 7

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> Aprimero=4:3:49
Aprimero =

Columns 1 through 12

4 7 10 13 16 19 22 25 28 31 34 37

Columns 13 through 16

40 43 46 49

>> Asegundo(1,:)=[4,7,10,13,39,42,45,48]

Asegundo =

4 7 10 13 39 42 45 48

>>

>>

>>

>> ejercicio 8

??? Undefined function or method 'ejercicio' for input arguments of type 'char'.

>> v1=1:3:25

v1 =

1 4 7 10 13 16 19 22 25

>> v2=72:-6:24

v2 =

72 66 60 54 48 42 36 30 24

>> v3=linspace(0,1,9)
v3 =

0 0.1250 0.2500 0.3750 0.5000 0.6250 0.7500 0.8750 1.0000

>> A=zeros(3,9)

A=

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

>> A(1,:)=v1,A(2,:)=v2

A=

1 4 7 10 13 16 19 22 25

0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0

A=

1 4 7 10 13 16 19 22 25

72 66 60 54 48 42 36 30 24

0 0 0 0 0 0 0 0 0

>> A(3,:)=v,A(1,:)=v1,A(2,:)=v2

??? Subscripted assignment dimension mismatch.

>> A(1,:)=v1,A(2,:)=v2,A(3,:)=v

A=

1 4 7 10 13 16 19 22 25

72 66 60 54 48 42 36 30 24

0 0 0 0 0 0 0 0 0

A=

1 4 7 10 13 16 19 22 25

72 66 60 54 48 42 36 30 24

0 0 0 0 0 0 0 0 0

??? Subscripted assignment dimension mismatch.


>> A(1,:)=v1,A(2,:)=v2,A(3,:)=v3

A=

1 4 7 10 13 16 19 22 25

72 66 60 54 48 42 36 30 24

0 0 0 0 0 0 0 0 0

A=

1 4 7 10 13 16 19 22 25

72 66 60 54 48 42 36 30 24

0 0 0 0 0 0 0 0 0

A=

1.0000 4.0000 7.0000 10.0000 13.0000 16.0000 19.0000 22.0000 25.0000

72.0000 66.0000 60.0000 54.0000 48.0000 42.0000 36.0000 30.0000 24.0000

0 0.1250 0.2500 0.3750 0.5000 0.6250 0.7500 0.8750 1.0000

>>

>>

>>

>> ejercicio 9

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> P=[6 43 2 11 87;12 6 34 0 5;34 18 7 41 9]

P=

6 43 2 11 87

12 6 34 0 5

34 18 7 41 9
>> ejercicio 9.a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> Va=[12,6,34,0,5]

Va =

12 6 34 0 5

>>

>>

>> ejercicio 9b

??? Undefined function or method ' ejercicio ' for input arguments of type

'char'.

>> Vb=[11 ,0,41]

Vb =

11 0 41

>>

>>

>>

>>
>> ejercicio 9c

??? Undefined function or method ' ejercicio ' for input arguments of type

'char'.

>> Vc=[6,43,2,11,87,12,6,34,0,5]

Vc =

6 43 2 11 87 12 6 34 0 5

>>

>>

>>

>>

>> ejercicio 9d

??? Undefined function or method ' ejercicio ' for input arguments of type

'char'.

>> Vd=[43,6,18,87,5,9]

Vd =

43 6 18 87 5 9

>>

>>

>>

>>
>> ejercicio 10

??? Undefined function or method ' ejercicio ' for input arguments of type

'char'.

>> C=[2 4 6 8 10;3 6 9 12 15;7 14 21 28 35]

C=

2 4 6 8 10

3 6 9 12 15

7 14 21 28 35

>>

>>

>> ejercicio 10a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> ua=[6;9;21]

ua =

21

>>

>>

>>

>>
>> ejercicio 10b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> ub=[3;6;9;12;15]

ub =

12

15

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>> ejercicio 10c

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> uc=[2;3;7;6;9;21;10;15;35]
uc =

21

10

15

35

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>> ejercicio 10d

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> ud=[2;4;6;8;10;3;6;9;12;15]
ud =

10

12

15

>> ejercicio 11a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A=zeros(4,7)

A=

0 0 0 0 0 0 0

0 0 0 0 0 0 0

0 0 0 0 0 0 0

0 0 0 0 0 0 0

>> ejercicio 11b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.
>> U=[21,18,15,12,9,6,3,5,10,9,25,7,14,3,35]

U=

Columns 1 through 12

21 18 15 12 9 6 3 5 10 9 25 7

Columns 13 through 15

14 3 35

>> ejercicio 12a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A1=zeros(2,5)

A1 =

0 0 0 0 0

0 0 0 0 0

>>

>>

>>

>>
>> ejercicio 12b

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A2=eye(4)

A2 =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

>>

>>

>>

>>

>> ejercicio 12c

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A3=ones(3,2)

A3 =

1 1

1 1

1 1
>> ejercicio 13a

??? Undefined function or method 'ejercicio' for input arguments of type

'char'.

>> A4=eye(7)

A4 =

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

0 0 0 0 1 0 0

0 0 0 0 0 1 0

0 0 0 0 0 0 1

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>>

>> A4(1,:)=[2 2 2 0 5 5 5],A4(2,:)=[2 2 2 0 5 5 5],A4(3,:)=[3 3 3 0 5 5 5],A4(5,:)=[4 4 7 0 9 9


9],A4(6,:)= [4 4 7 0 9 9 9],A4(7,:)= [4 4 7 0 9 9 9]
A4 =

2 2 2 0 5 5 5

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

0 0 0 0 1 0 0

0 0 0 0 0 1 0

0 0 0 0 0 0 1

A4 =

2 2 2 0 5 5 5

2 2 2 0 5 5 5

0 0 1 0 0 0 0

0 0 0 1 0 0 0

0 0 0 0 1 0 0

0 0 0 0 0 1 0

0 0 0 0 0 0 1

A4 =

2 2 2 0 5 5 5

2 2 2 0 5 5 5

3 3 3 0 5 5 5

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

0 0 0 0 0 1 0

0 0 0 0 0 0 1

A4 =

2 2 2 0 5 5 5

2 2 2 0 5 5 5

3 3 3 0 5 5 5

0 0 0 1 0 0 0

4 4 7 0 9 9 9

0 0 0 0 0 1 0

0 0 0 0 0 0 1

A4 =

2 2 2 0 5 5 5

2 2 2 0 5 5 5

3 3 3 0 5 5 5

0 0 0 1 0 0 0

4 4 7 0 9 9 9

4 4 7 0 9 9 9

0 0 0 0 0 0 1

A4 =
2 2 2 0 5 5 5

2 2 2 0 5 5 5

3 3 3 0 5 5 5

0 0 0 1 0 0 0

4 4 7 0 9 9 9

4 4 7 0 9 9 9

4 4 7 0 9 9 9

>>

>>

>>

>>

>>

>>

>> EJERCICIO 14

??? Undefined function or method 'EJERCICIO' for input arguments of type

'char'.

>> A5=zeros(3,5)

A5 =

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

>> A5(1,2)=1,A5(2,2)=1,A5(3,2)=1,A5(1,4)=1,A5(2,4)=1,A5(3,4)=1

A5 =
0 1 0 0 0

0 0 0 0 0

0 0 0 0 0

A5 =

0 1 0 0 0

0 1 0 0 0

0 0 0 0 0

A5 =

0 1 0 0 0

0 1 0 0 0

0 1 0 0 0

A5 =

0 1 0 1 0

0 1 0 0 0

0 1 0 0 0

A5 =
0 1 0 1 0

0 1 0 1 0

0 1 0 0 0

A5 =

0 1 0 1 0

0 1 0 1 0

0 1 0 1 0

Você também pode gostar