0% found this document useful (0 votes)
153 views3 pages

Syntax For The Format: - Syntax For Matrix A: - Syntax For Matrix B: - Syntax For Matrix C

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

NAME : _________________________ Section:

_____________________

MATLAB ACTIVITY 2 – Matrix in MATLAB

A. Write the syntax that will create the following matrices.

Matrix MATLAB Syntax

B.  In MATLAB enter the following matrices use appropriate format. Write your syntax in the space
provided.

MATLAB Syntax

Syntax for the format : _____________________

Syntax for Matrix A: ______________________

Syntax for Matrix B : ______________________

Syntax for Matrix C : ______________________


Using MATLAB commands and the Matrices in above compute the following expressions if possible.
Write the MATLAB SYNTAX you used and MATLAB out put on the space provided

1. Product of A and C

2. Sum of A and  transpose of C

3. Six times of transpose of A subtracted to Twice C multiplied to transpose of B

4. Sum of the product of A and its transpose and the product of C and its transpose.

5. Product of A and B

C. A matrix (plural matrices) is sort of like a “box” of information where you are keeping track of things
both right and left (columns), and up and down (rows).

As an example, if you had three sisters, and you wanted an easy way to store their age and number of
pairs of shoes, you could store this information in a matrix. The actual matrix is inside and includes the
brackets:
Solve the following problem using MATLAB. Write the syntax and the MATLAB out put on the space provided.

1. The grades of 3 students in a test are 95, 92,80 respectively; in projects are 100, 80 and 90;homework
100, 100 and 90; and in the quiz are 75;80and 90 . The tests are 40% of the grade, projects 15%,
homework 25%, and quizzes 20%.. Organize the data in a matrix and perform necessary operation to
find the final grades of the 3 students. Use MATLAB to verify the answer.

2. An outbreak of a virus hit the local public schools. Approximately 15% of the male and female juniors
and 25% of the male and female seniors are currently healthy, 35% of the male and female juniors
and 30% of the male and female seniors are currently sick, and 50% of the male and female juniors
and 45% of the male and female seniors are carriers of virus. 

There are 100 male juniors, 80 male seniors, 120 female juniors, and 100 female seniors.


Using two matrices and one matrix equation, find out how many males and how many females (don’t
need to divide by class) are healthy, sick, and carriers.

You might also like