Question: 1. (30 points) Create a Matlab script questionl.m that: Generates two random positive integers, records them into memory as n and m. (Hint: use the

 1. (30 points) Create a Matlab script "questionl.m" that: Generates two

1. (30 points) Create a Matlab script "questionl.m" that: Generates two random positive integers, records them into memory as n and m. (Hint: use the builtin "randi" command.) Generates a random matrix of size n x m saves it into memory as A. Creates a new matrix B, initially of all zeros and size n x m. Re-assigns entries of B, using data slicing and point-wise operations, so that bij = a;. (Hint: on top of the slicing, you have to run a loop over all rows.) Creates a new array "A_row_sum such that every entry in that array is the sum of all entries of the relevant row of B. Creates a new array "A_col_sum such that every entry in that array is the sum of all entries of the relevant column of B. Creates a new variable "A_total sum" that is the sum of every entry of B. Upload your solution as Questionl.m Wrong file formats get -20 pts! NO SCREEN CAPS

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 Databases Questions!