(Solved) : Part Use Logical Vector Make Multiple Decisions Parallel Concerning Values Two Arrays Firs Q31173042 . . .
This is Matlab. Need answers with proper comments, please.ThanksIn this part, you will use a logical vector to make multiple decisions in parallel concerning values in two arrays. Firstly, generate two random [1×10] arrays using randi. The numbers should be integers between 1 and 20. Let’s call these two arrays al and a2. Your task is to generate a third array, a 3, which at each index, contains the larger out of the two arrays al and a2. You must accomplish all this using the logical vector and no loops Hint: try constructing a logical vector of size [x10 to store logical values based on ifal)> a2) Finally, create a random 5×5 numeric 2D array with numbers between 1 and 100 using one line of code Replace all values above 50 in this matrix with the value 0, again, using only one line of code. Show transcribed image text
Expert Answer
Answer to Part Use Logical Vector Make Multiple Decisions Parallel Concerning Values Two Arrays Firs Q31173042 . . .
OR