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

Home Assignment: Based On Lab-6 Experiments: Problem - 1: Consider The Following Matrix

This document provides instructions for two MATLAB assignments based on a matrix. The first problem asks to write a code to eliminate negative elements from the given matrix. The second problem asks to count the number of 10s in the matrix, with the expected output being that there are 4 instances of the number 10.

Uploaded by

shahnewaz.eee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Home Assignment: Based On Lab-6 Experiments: Problem - 1: Consider The Following Matrix

This document provides instructions for two MATLAB assignments based on a matrix. The first problem asks to write a code to eliminate negative elements from the given matrix. The second problem asks to count the number of 10s in the matrix, with the expected output being that there are 4 instances of the number 10.

Uploaded by

shahnewaz.eee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EEE 454

HOME ASSIGNMENT: BASED ON LAB-6 EXPERIMENTS

Problem - 1: Consider the following matrix.

A=

2 4 6 12 9

-1 2 -3 10 0

12 9 -3 7 10

15 -2 -9 14 -9

2 10 2 3 10

Write down a MATLAB code, which will scan the matrix and eliminates its negative elements. The result
should be the following.

A=

2 4 6 12 9

0 2 0 10 0

12 9 0 7 10

15 0 0 14 0

2 10 2 3 10

Problem – 2

Consider the matrix for Problem – 1. Write down a MATLAB code to count how many 10 there are in
that matrix.

A=

2 4 6 12 9

-1 2 -3 10 0

12 9 -3 7 10

15 -2 -9 14 -9

2 10 2 3 10
Therefore, the output of your code should be:

The total number of 10 in matrix A is

You might also like