Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

by using matlab 4. Create the following arrays as variables. Do not suppress the output so that they appear in the command window: (4 pts,

by using matlab image text in transcribed
image text in transcribed
4. Create the following arrays as variables. Do not suppress the output so that they appear in the command window: (4 pts, 1 pt each): A = [1 2 3 4 5) using the colon operator 12 3 B = 18 4 19 11 C=a 3x3 matrix of 5's D= a 4x1 vector of random integers between 4 and 16 Page 2 > of 3 ZOOM + D-a 4xl vector of random integers between 4 and 16 5. WITHOUT CLEARING YOUR WORKSPACE, perform the following operations on these variables to create the following arrays as variables. Do not suppress the output so that they appear in the command window (11 pts, 1 pt each): 31 a. Create matrix E = 2 4 by using the vector A (you may break this into a few steps, but it can be 3 5 done in one using indices properly) b. Q2b=E+B c. Q2c = E-B d. Q2d=E.*B e. Q2e = Multiply matrix E by the transpose of B (report in your comments why this change is necessary compared to 2d) f. Use the rem function to identify which values of A are evenly divisible by 2. State in your comments how you know this based on the results g. Find the minimum value (MinD1) and it's index (11) of D (you may need to check the help for this last part) h. Reset the random number seed and repeat g using MinD2 and 12 as the variables recording the information. i. Q2i = the sum of all elements of C j. Q2j = a logical array indicating the values of Ethat are greater than or equal to 3. k. Q2k = a logical array indicating which elements of B are greater than their corresponding elements in E

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions