0% found this document useful (0 votes)
370 views

Matrices: Ece120L - Introduction To Matlab Laboratory Activity #2

The document describes a MATLAB laboratory activity on matrices. The learning outcomes are to use MATLAB to create and manipulate matrices and solve systems of linear equations. The activity consists of 10 problems involving creating, manipulating and performing operations on various matrices using MATLAB code.

Uploaded by

Jaymee Delfinado
Copyright
© © All Rights Reserved
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)
370 views

Matrices: Ece120L - Introduction To Matlab Laboratory Activity #2

The document describes a MATLAB laboratory activity on matrices. The learning outcomes are to use MATLAB to create and manipulate matrices and solve systems of linear equations. The activity consists of 10 problems involving creating, manipulating and performing operations on various matrices using MATLAB code.

Uploaded by

Jaymee Delfinado
Copyright
© © All Rights Reserved
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/ 7

ECE120L – INTRODUCTION TO MATLAB

LABORATORY ACTIVITY #2
MATRICES

Name: Delfinado, Mia Jaymee P. Date: APRIL 01, 2020


Section: C24 Laboratory Instructor: Jonathan Oracion

I. Learning Outcomes:
1. At the end of the laboratory activity, the students should be able to:
2. Use MATLAB in creating and manipulating matrices.
3. Solve linear systems of equation using MATLAB

II. Laboratory Activity


1. A. Problem:
Create the following matrices using matrix shortcuts.
a. 5 – by – 4 identity matrix
b. 6 – by – 3 ones matrix
c. 4 – by – 5 zeros
d. 4 – by – 4 uniformly distributed pseudorandom numbers
e. 3 – by – 5 normally distributed pseudorandom numbers

B. MATLAB codes:
2. A. Problem:
If A = magic (24), what is the value in row 21, column 22?

B. MATLAB codes:

3. A. Problem:
Create the matrix X = diag ([3:3:15]).

B. MATLAB codes:

4. A. Problem:
Using magic square of 5, write the values in lower triangular.

B. MATLAB codes:

5. A. Problem:
Using magic square of 4, write the values in upper triangular.

B. MATLAB codes:

6. A. Problem:
Determine the determinant of the matrix.
1 3 6

[ −2 5 9
7 −2 23 ]
B. MATLAB codes:

7. A. Problem:
Determine the determinant and coefficients w, x, y, z
Given: w – 12x +13y – 7z = 23
2w + 15x + 16y + 12z = 19
4w – 10x + y + 17z = 24
3w + 2x – 3y + 2z = 14

B. MATLAB codes:
8. A. Problem:
Define the matrices below: (use shortcuts if applicable)
1 2 3 4 1 1 1 1 16 2 3 13 1 0 0 0 1 0 0 0  3 6 9 12
1  5 11 10 8  18 24 3 15
6 8 1 5  1 1 1 0 3 0 0 0 1 0 0
A B C  D E F 
9 4 2 7 1 1 1 1  9 7 6 12 0 0 5 0 0 0 0 1 27 12 6 21
           
9 4 7 2 1 1 1 1  4 14 15 1  0 0 0 7 1 0 0 0 27 12 21 6 

B. MATLAB codes:

9. A. Problem:
Using the matrices of #8, solve the following:
a. 3A+4F
b. ABC/4F
c. 2DEF+4B
d. FEB/2CD
e. (2B – 3D)(2ABC)

B. MATLAB codes:
10. A. Problem:
Create the matrix below using the matrices of #8.
1 2 3 4 2 2 2 2 4 3 3 3
6 8 1 5 2 2 2 2 3 4 3 3
9 4 2 7 2 2 2 2 3 3 3 4
9 4 7 2 2 2 2 2 4 3 3 3
1 4 7 10 16 2 3 13 1 0 0 0
16 22 1 13 5 11 10 8 0 3 0 0
25 10 4 19 9 7 6 12 0 0 5 0
25 10 19 4 4 14 15 1 0 0 0 7

B. MATLAB codes:

You might also like