Professional Documents
Culture Documents
Examen T1 Diego Lara Sánchez 1. Ejercicio 1
Examen T1 Diego Lara Sánchez 1. Ejercicio 1
1. EJERCICIO 1
>> A=[3 -2 1 7 5; 0 3 5 -1 -2; 4 4 8 0 2; 11 3 1 5 6]
A=
-2
-1
-2
11
B=
-1
23
>> C=(A*B)
C=
23 135
68
18 -18
60 102
42
63 219
88
>> S=68+2*219-5*102-88
S=
-92
>> S=[C(1,3)+2*C(4,2)-5*C(3,2)-C(4,3)]
S=
-92
2. EJERCICIO 2
>> D=[2 -1 0 0; -1 2 -1 0; 0 -1 2 -1; 0 0 -1 2]
D=
-1
-1
-1
-1
-1
-1
>> E=[1;0;0;0]
E=
1
0
0
0
>> SOl=(D\E)
SOl =
0.8000
0.6000
0.4000
0.2000
SOl =
4/5
3/5
2/5
1/5
3.EJERCICIO 3
>> F=[1 1 1; 1 2 4; 1 3 9]
F=
>> G=[6;5;2]
G=
6
5
2
>> SOL=(F\G)
SOL =
5
2
-1
>> y=5+2*x-1*(x).^2
>> x=(-2:0.2:5)
x=
Columns 1 through 7
-2
-9/5
-8/5
-7/5
-6/5
-1
-4/5
-1/5
1/5
2/5
3/5
6/5
7/5
8/5
9/5
Columns 8 through 14
-3/5
-2/5
Columns 15 through 21
4/5
Columns 22 through 28
11/5
12/5
13/5
14/5
16/5
17/5
22/5
23/5
24/5
Columns 29 through 35
18/5
Column 36
>> plot(x,y)
19/5
21/5