Question: Task 2 : Refer to matrix A below. A = [ 3 5 - 4 - 8 - 1 3 3 - 1 7 6

Task 2: Refer to matrix A below.
A=[35-4-8-133-176-9]
Write a program that computes a new matrix B by calculating the natural logarithm ) for any element of A that is greater than or equal to 1. Otherwise, add 20 to any element of A that is less than 1. You will need to use two for loops within each other and an IF-ELSE statement within the INNER-most loop. You will also need to utilize 2-dimensional indexing to refer to elements within matrices A and B.
Task 2 : Refer to matrix A below. A = [ 3 5 - 4 -

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!