0% found this document useful (0 votes)
36 views4 pages

Nombre: Calcina Cari Yermain Seccion 4° Única 2.

This document contains examples of operations with matrices and vectors in MATLAB. It defines several matrices, including: 1. A 6x1 vector with numeric values ranging from -1 to -15. 2. A 3x3 matrix with all 1s. 3. An expanded 5x5 matrix with blocks of 1s and blocks of 5s. It performs various indexing and slicing operations on these matrices, such as extracting rows, columns, and blocks. It also generates identity and zero matrices as well as matrix multiplication examples.

Uploaded by

alison471
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views4 pages

Nombre: Calcina Cari Yermain Seccion 4° Única 2.

This document contains examples of operations with matrices and vectors in MATLAB. It defines several matrices, including: 1. A 6x1 vector with numeric values ranging from -1 to -15. 2. A 3x3 matrix with all 1s. 3. An expanded 5x5 matrix with blocks of 1s and blocks of 5s. It performs various indexing and slicing operations on these matrices, such as extracting rows, columns, and blocks. It also generates identity and zero matrices as well as matrix multiplication examples.

Uploaded by

alison471
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NOMBRE: CALCINA CARI YERMAIN

2.>> a=[55;14;log(51);987;0;5*sin(2.5*pi)]
a=
55.0000
14.0000
3.9318
987.0000
0
5.0000

4.b=[15:-5:-25]
b=
15 10

0 -5 -10 -15 -20 -25

>> c=b'
c=
15
10
5
0
-5
-10
-15
-20
-25

6.A=linspace(-1,-15,12)'
A=
-1.0000
-2.2727
-3.5455
-4.8182
-6.0909
-7.3636
-8.6364
-9.9091
-11.1818
-12.4545
-13.7273
-15.0000

SECCION 4 nica

8.B=[1 4 7 10 13 16 19 22 25; 72 66 60 54 48 42 36 30 24; linspace(0,1,9)]


B=
1 4 7 10 13 16 19 22 25
72 66 60 54 48 42 36 30 24
0 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.0000

10.>> 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
a) >> au=C(:,3)
au =
6
9
21
b) >> ub=C(2,:)
ub =
3 6

9 12 15

>> ub=C(2,:)'
ub =
3
6
9
12
15
c) >> uc=C(:,1:2:5)
uc =
2 6 10
3 9 15
7 21 35

d) >> ud=C(1 :2,:)'


ud =
2
4
6
8
10

3
6
9
12
15

12.a) >> zr=zeros(2,5)


zr =
0
0

0
0

0
0

0
0

0
0

b) >> idn=eye(4,4)
idn =
1
0
0
0

0
1
0
0

0
0
1
0

0
0
0
1

c) >> ne=ones(3,2)
ne =
1
1
1

1
1
1

14.a=[0 0 1 1 0; 0 0 1 1 0; 0 0 1 1 0]
a=
0
0
0

0
0
0

1
1
1

1
1
1

0
0
0

16.>> A=[1 1 1 ; 1 1 1; 1 1 1]
A=
1
1
1

1
1
1

1
1
1

>> B=[5 5 ; 5 5]
B=
5
5

5
5

>> A=[1 1 1 0 0 ; 1 1 1 0 0 ; 1 1 1 0 0; 0 0 0 5 5; 0 0 0 5 5]
A=
1
1
1
0
0

1
1
1
0
0

1
1
1
0
0

0
0
0
5
5

0
0
0
5
5

You might also like