Académique Documents
Professionnel Documents
Culture Documents
Suponiendo que A=5, B=10, C=2, D=15, E=2 evalu correctamente el resultado de las
siguientes expresiones, mostrando los resultados por pantalla:
>> A=5
A=
>> B=10
B=
10
>> C=2
C=
>> D=15
D=
15
>> E=2
E=
a) >> X=A+(B-C)^E
X=
69
b) >> X=A+B-C/E
X=
14
c) >> X=D*E^E-C
X=
58
d) >> X=A*B/E+6
X=
31
e) >> X=(B+E)^C^E+2*A
X=
20746
f) >> X=(B+D)^E+(B+C)
X=
637
g) >> X=(B+A)^E+D*A
X=
300
h) >> X=(A+B+C)^C^E+50*A
X=
83771
i) >> X=(D+E)^5^2+60*50
X=
2.0160e+12
j) >> X=(D+B)^5^E+2*A
X=
9.5367e+13
k) >> X=(E)^C^2+8*A
X=
56
l) >> X=(100+B)+6+100^C^E
X=
100000116
m) >> X=(B+200)+5+256^E+2*B
X=
65771
n) >> X=(500+B)^C^E+800*A
X=
6.7652e+10
a) e^2/3
>> exp(2)/3
ans =
2.4630
b) x=e^2/3
>> X=exp(2)/3
X=
2.4630
c) y=e^2/3
>> y=exp(2)/3
y=
2.4630
d) y=2*x+1
>> Y=2*X+1
Y=
5.9260
e) x=x+1
>> X=X+1
X=
3.4630
x=
2.4630
y=
5.9260
z=
7.3891
g) y=sqrt(16)
>> Y=sqrt(16)
Y=
h) M=sqrt(20) + abs(-4)
>> M=sqrt(20)+abs(-4)
M=
8.4721
4. Calcular
>> 15+6
ans =
21
>> x=15+6
x=
21
>> x
x=
21
>> y=12*2
y=
24
>> x+y
ans =
45
>> z=y-x
z=
>> z
z=
>> cos(pi())
ans =
-1
i. Calcular el coseno de 180 (tomando el ngulo en grados sexagesimales):
>> cos(180*pi()/180)
ans =
-1
>> exp(1)
ans =
2.7183
>> sqrt(16)
ans =
>> 2/3
ans =
0.6667
>> 2/3
ans =
0.666666666666667
>> 2/3
ans =
0.6667
q. Haz que aparezcan por pantalla las variables que estas utilizando:
>> whos
A 1x1 8 double
B 1x1 8 double
C 1x1 8 double
D 1x1 8 double
E 1x1 8 double
M 1x1 8 double
X 1x1 8 double
Y 1x1 8 double
x 1x1 8 double
y 1x1 8 double
z 1x1 8 double
r. Borra la variable z:
clear z
s. Vuelve a hacer que aparezcan por pantalla las variables que estas utilizando:
>> whos
B 1x1 8 double
C 1x1 8 double
D 1x1 8 double
E 1x1 8 double
M 1x1 8 double
X 1x1 8 double
Y 1x1 8 double
x 1x1 8 double
y 1x1 8 double
>> rem(6,2)
ans =
>> rem(5,2)
ans =
>> abs(-8)
ans =
>> abs(-1)
ans =
x. Hallar el seno de 1:
>> sin(1)
ans =
0.8415
y. Hallar el coseno de 2:
>> cos(2)
ans =
-0.4161
z. Hallar la tangente de 2:
>> tan(2)
ans =
-2.1850
A. rea de un triangulo
>> base1=1;
>> base2=6.2;
>> altura1=3;
>> altura2=1.5;
>> area1=base1*altura1/2
area1 =
1.5000
>> area2=base2*altura2/2
area2 =
4.6500
B. energa relativista
>> m1=2;
>> m2=6.2;
>> c=300000;
>> E1=m1*c^2
E1 =
1.8000e+11
>> E2=m2*c^2
E2 =
5.5800e+11
>> a1=1; a2=13.95; a3=1; a4=1; a5=1; a6=1; a7=1; a8=1; a9=2;
>> b1=0; b2=6.2; b3=-3; b4=0; b5=-2; b6=-10; b7=1; b8=0; b9=1;
>> c1=-1; c2=1.5; c3=2; c4=-1; c5=1; c6=25; c7=1; c8=0; c9=2;
>> x1=(-b1+sqrt(b1^2-4*a1*c1))/(2*a1)
x1 =
>> x1=(-b1-sqrt(b1^2-4*a1*c1))/(2*a1)
x1 =
-1
>> x2=(-b2+sqrt(b2^2-4*a2*c2))/(2*a2)
x2 =
-0.2222 + 0.2411i
>> x2=(-b2-sqrt(b2^2-4*a2*c2))/(2*a2)
x2 =
-0.2222 - 0.2411i
>> x3=(-b3+sqrt(b3^2-4*a3*c3))/(2*a3)
x3 =
2
>> x3=(-b3-sqrt(b3^2-4*a3*c3))/(2*a3)
x3 =
>> x4=(-b4+sqrt(b4^2-4*a4*c4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y1)/(3*x1^2+6*y1^4)-sqrt(3*x1^2-28)/(123-y1)
z1 =
-0.0006 - 0.0442i
>> z2=(5*x2-4*y2)/(3*x2^2+6*y2^4)-sqrt(3*x2^2-28)/(123-y2)
z2 =
0.0007 + 0.0498i
>> z3=(5*x3-4*y3)/(3*x3^2+6*y3^4)-sqrt(3*x3^2-28)/(123-y3)
z3 =
-0.0000 - 0.1053i
>> z4=(5*x4-4*y4)/(3*x4^2+6*y4^4)-sqrt(3*x4^2-28)/(123-y4)
z4 =
-0.0006 - 0.0442i
>> z5=(5*x5-4*y5)/(3*x5^2+6*y5^4)-sqrt(3*x5^2-28)/(123-y5)
z5 =
-0.0006 - 0.0442i
>> z6=(5*x6-4*y6)/(3*x6^2+6*y6^4)-sqrt(3*x6^2-28)/(123-y6)
z6 =
0.0012
>> z7=(5*x7-4*y7)/(3*x7^2+6*y7^4)-sqrt(3*x7^2-28)/(123-y7)
z7 =
0.0005 + 0.0484i
>> z8=(5*x8-4*y8)/(3*x8^2+6*y8^4)-sqrt(3*x8^2-28)/(123-y8)
z8 =
-0.0002 - 0.0490i
>> z9=(5*x9-4*y9)/(3*x9^2+6*y9^4)-sqrt(3*x9^2-28)/(123-y9)
z9 =
-0.0004 + 0.0509i