Ejercicios de matlab.
Enviado por Casull Alejandro • 18 de Diciembre de 2015 • Tarea • 1.570 Palabras (7 Páginas) • 186 Visitas
>> Ejercicio 11 Mtx=[7,5,19,6,4,15;2,1,9,12,8,11;3,24,13,16,23,10;20,21,18,22,17,14]
Mtx =
7 5 19 6 4 15
2 1 9 12 8 11
3 24 13 16 23 10
20 21 18 22 17 14
a)>> a=Mtx(:,2),b=Mtx(:,4),c=Mtx(:,6)
a =
5
1
24
21
b =
6
12
16
22
c =
15
11
10
14
>> A=[a,b,c]
A =
5 6 15
1 12 11
24 16 10
21 22 14
b)
>> b=Mtx(:,2)
b =
5
1
24
21
>> x=b((end:-1:1),:)
x =
21
24
1
5
>> x=x(1:3)
x =
21
24
1
>> c=Mtx(:,3)
c =
19
9
13
18
>> y=c((end:-1:1),:)
y =
18
13
9
19
>> y=y(1:3)
y =
18
13
9
>> a=Mtx(:,5)
a =
4
8
23
17
>> z=a((end:-1:1),:)
z =
17
23
8
4
>> z=z(1:3)
z =
17
23
8
>> B=[z,y,x]
B =
17 18 21
23 13 24
8 9 1
c) >> b=Mtx(:,6)
b =
15
11
10
14
>> a=Mtx(2,:)'
a =
2
1
9
12
8
11
>> c=Mtx(3,:)'
c =
3
24
13
16
23
10
>> x=a((end:-1:1),:), x=x(2:5)
x =
11
8
12
9
1
2
x =
8
12
9
1
>> y=b((end:-1:1),:), y=y(2:5)
y =
14
10
11
15
>> z=c(1:4)
z =
3
24
13
16
>> C=[x,y,z]
C =
8 14 3
12 10 24
9 11 13
1 15 16
d) >> c1=Mtx(:,5), c1=c1(2:3)
c1 =
4
8
23
17
c1 =
8
23
>> c2=Mtx(:,3), c2=c2(2:3)
c2 =
19
9
13
18
c2 =
9
13
>> culum=[c1;c2]
culum =
8
23
9
13
>> i=Mtx(3,(2:4))
i =
...