Question: Problem 1 Generate a 3 x 3 random integer matrix in the range - 8 to 2 7 store it in a variable named matA

Problem 1
Generate a 3x3 random integer matrix in the range -8 to 27 store it in a variable named matA
a. subtract 4 from each element of matA, then cube each element.
b. get the minimum and the maximum values of matA. Store them in variables minA and maxA
c. count how many elements of matA are positive, how many are negative, and how many elements are equal to 0. Store the results in variables posA, negA, zeroA
d. get the sum and the product of all elements in matA. Store the results in variables sumA and prodA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!