Anda di halaman 1dari 16

08

Otoo
S E T I E MB R E 2 0 1 3
INTEGRANTES:
CARHUAZ SOTO, Kassandra
GALLARDO VILLAVICENCIO Kevin
PORTILLO PAULINO Nicolei Randall Marlon
ROJAS JUSTINIANO Abigail
ROMERO HUAMN, Joseph
DOCENTE:
Ing. CALLUPE CUEVA J. Abel
REA:
Matemtica Bsica II

2
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil



>> %% TAREA DE MATLAB CLASE 2
>> %%INGRESAR FILAS E COLUMNAS
>> FILA=[6,7,24,2.3,9]

FILA =

6.0000 7.0000 24.0000 2.3000 9.0000

>> FILA2=[6,3.2,1.5,6.4,7,8,1]

FILA2 =

6.0000 3.2000 1.5000 6.4000 7.0000 8.0000 1.0000

>> FILA3=[5,1.5,sqrt(5),4.54,5.7,8]

FILA3 =

5. 0000 1.5000 2.2361 4.5400 5.7000 8.0000

>> COL=[2;5;-5;-8;2.2]

COL =


3
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

2.0000
5.0000
-5.0000
-8.0000
2.2000

>> COL2=[-2.5;5.3;5;4.6;-0.3]

COL2 =

-2.5000
5.3000
5.0000
4.6000
-0.3000

>> COL3=[4.5;1.2;7.5;8.6;-5.9]

COL3 =

4.5000
1.2000
7.5000
8.6000
-5.9000


4
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

>> %%OPERADOR PASO
>> %%PASO DIFERENTE DE 1
>> K=1:5:28

K =

1 6 11 16 21 26

>> K1=5:6:97

K1 =

5 11 17 23 29 35 41 47 53 59 65 71 77 83 89 95

>> K3=98:7:128

K3 =

98 105 112 119 126

>> %%PASO IGUAL DE 1
>> B=5:13

B =

5 6 7 8 9 10 11 12 13

5
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil


>> B2=15:28

B2 =

15 16 17 18 19 20 21 22 23 24 25 26 27 28

>> B3=189:201

B3 =

189 190 191 192 193 194 195 196 197 198 199 200 201

>> %%RECONOCIMIENTO DE LOS ELEMENTOS DE UNA MATRIZ
>> %%POR SUS INDICES
>> A=[7 5 6 5;7 2 6 2;4 6 8 9]

A =

7 5 6 5
7 2 6 2
4 6 8 9

>> a32=A(3,2)

a32 =

6
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil


6

>> a33=A(3,3)

a33 =

8

>> a22=A(2,2)

a22 =

2

>> B=[-5 -2 2 4;7 5 9 1; -8 0 3 2]

B =

-5 -2 2 4
7 5 9 1
-8 0 3 2

>> b3=B(3)

b3 =

7
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil


-8

>> b5=B(5)

b5 =

5

>> b9=B(9)

b9 =

3

>> %%MATRICES ESPECIALES
>> %%ZEROS
>> Z1=zeros(3)

Z1 =

0 0 0
0 0 0
0 0 0

>> Z1=zeros(5)

8
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil


Z1 =

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

>> Z1=zeros(9)

Z1 =

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

>> Z1=zeros(2,4)

Z1 =

9
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil


0 0 0 0
0 0 0 0

>> Z1=zeros(5,7)

Z1 =

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
0 0 0 0 0 0 0

>> Z1=zeros(9,3)

Z1 =

0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

10
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

0 0 0

>> Z1(1)=6

Z1 =

6 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

>> Z1(2)=9

Z1 =

6 0 0
9 0 0
0 0 0
0 0 0
0 0 0
0 0 0

11
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

0 0 0
0 0 0
0 0 0

>> Z1(3)=5

Z1 =

6 0 0
9 0 0
5 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

>> Z1(4)=1

Z1 =

6 0 0
9 0 0
5 0 0
1 0 0

12
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

>> Z1(5)=23

Z1 =

6 0 0
9 0 0
5 0 0
1 0 0
23 0 0
0 0 0
0 0 0
0 0 0
0 0 0

>> Z1(6)=21

Z1 =

6 0 0
9 0 0

13
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

5 0 0
1 0 0
23 0 0
21 0 0
0 0 0
0 0 0
0 0 0

>> Z1(7)=89

Z1 =

6 0 0
9 0 0
5 0 0
1 0 0
23 0 0
21 0 0
89 0 0
0 0 0
0 0 0

>> Z1(8)=-8

Z1 =


14
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

6 0 0
9 0 0
5 0 0
1 0 0
23 0 0
21 0 0
89 0 0
-8 0 0
0 0 0

>> Z1(9)=4

Z1 =

6 0 0
9 0 0
5 0 0
1 0 0
23 0 0
21 0 0
89 0 0
-8 0 0
4 0 0
>> load E:\TAREAMAT\DATA1.txt
>> DATA1


15
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

DATA1 =

5 6 7 9
5 2 1 0
1 7 9 2

>> load E:\TAREAMAT\DATA2.txt
>> DATA2

DATA2 =

5 6 8 9
-5 -4 0 3
3 1 5 6

>> load E:\TAREAMAT\DATA3.txt
>> DATA3

DATA3 =

5 8 -1 0
5 9 10 -1
3 4 -9 0

>> MATRIZ1=[2 5 8 9; -3 0 -1 5; 5 4 9 7];
>> save E:\TAREAMAT\DATA4.txt MATRIZ1 -ascii

16
Universidad Nacional Daniel Alcides Carrin
Escuela de Ingeniera Civil

>> MATRIZ2=[ -5 -4 7 9;5 8 9 5;1 -2 3 4];
>> save E:\TAREAMAT\DATA5.txt MATRIZ2 -ascii
>> MATRIZ3=[5 -10 5 0; 5 -7 9 1;3 4 9 2];
>> save E:\TAREAMAT\DATA6.txt MATRIZ3 -ascii

Anda mungkin juga menyukai