Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started