###### Question:

% use logical tests to locate and update subsets of a matrix

% Step 1: Create vec, a row vector of 5 random integers on the closed interval [-10,10].

% Step 2: Use a logical mask to count the number of positive values (code provided is already sufficient)

% Step 3: Use the find function to locate where the positive values are in

% the vector (code provided is already sufficient)

inds = find(vec > 0)

% Step 4: Display only the positive values in vec (index into vec using the inds variable)

% Step 5: Negate the positive values by indexing into

% vec using the mask variable, and multiplying all those values by -1

.

% Matrix multiplication

% Step 1:

%a) Define matrices A, B, and C as shown in Ex 42

% b) compute the expressions 3*A and A+3

% c) compute the expressions A*C, C*A, C*C and C.*C

% comment out any expression that does not compute successfully

% c) compute the expressions A*A and A.*A

% (Be sure you understand the difference between these two operations.

% Step 2:

% a) define matrices A, B and C as shown in Ex 43

% b) compute the matrix operations A*A,B*B and C*C

% comment out any expression that does not compute successfully

% c) use the size function to display the dimensions of B and C

% then compute the matrix operations B*C and C*B

% comment out any expression that does not compute successfully

% (Be sure you understand how to predict which the matrix products will

% compute, along with the dimensions of the result.)

#### Similar Solved Questions

##### How to configure router 1 to be able to communicate with other routers using one ip...
how to configure router 1 to be able to communicate with other routers using one ip address instead of 4 Configure and install a summary route on R01 to allow PC1 to reach all networks on R02, R03, & R04 10.?.21.0/24 10.?.20.0/24 LOO Gig0/0 1.?.10/30 Gig0/0 R04 Se0/0/0 e Se0/0/0 Gig0/1 PC1 Gi...
##### Gsuge the O Type hene to sec O Tyoe here to easch
gsuge the O Type hene to sec O Tyoe here to easch...
##### Find the general solution of y" – 54"' + 6y' = 0. 8.8 A BRIEF TABLE...
Find the general solution of y" – 54"' + 6y' = 0. 8.8 A BRIEF TABLE OF LAPLACE TRANSFORMS F(s) (s > 0) n! " (s > 0) (1 - integer > 0) T(+1) I". P> -1 (8 >0) 8 a n! (8 - a)"+1 (x > 0) On integer > 0) Coswt (s > 0) 32.+wa sin! (8 > 0) EM cos...
##### Internal pressure, at, can be written as What is at for a gas that follows the...
Internal pressure, at, can be written as What is at for a gas that follows the van der Waals equation? vdw eqn: P= NRT n'a V - nb V2 Note: a and b are empirical constants...
##### What's the relationship between CO2, bicarbonate (HC03- ), and carbonic acid (H2CO3)? In what form is...
What's the relationship between CO2, bicarbonate (HC03- ), and carbonic acid (H2CO3)? In what form is most CO2 carried in our blood? What is the role of carbonic anhydrase in gas exchange?...
##### I need positive thought and agree with the statement at leat 100 words 2. Why is...
i need positive thought and agree with the statement at leat 100 words 2. Why is it important for professionals to attend professional conferences and read the professional literature? If I want to say in summarized I would say to stay informed on the always expanding knowledge in the physical acti...
##### Question 6 of 10 The medication order is as follows: VANCOMYCIN IVPB 1000 MG, 5% DEXTROSE...
Question 6 of 10 The medication order is as follows: VANCOMYCIN IVPB 1000 MG, 5% DEXTROSE IN WATER 200 ML once per day, INFUSE the medication over 90 minutes first dose now. What ml/hour flow rate will you set for the secondary infusion of VANCOMYCIN? Round to the nearest whole number...
##### Leadership theories of organizational power and influence
leadership theories of organizational power and influence...
##### Region bounded by y=x², X=2 & axis a whats the integral that describes the volume or...
Region bounded by y=x², X=2 & axis a whats the integral that describes the volume or the solid made by rotating the region about the x a b) The y axis ? c) x=5?...
##### Please show steps. i know its not 7.60 or 7.31 You add 1 L of 100...
please show steps. i know its not 7.60 or 7.31 You add 1 L of 100 mM HCl to 1 L of 100 mM Tris buffer (initial pH = 7.60 and a pka of 8.10). What is the approximate final pH? Select one: a. The final pH would be 12.70 b. The final pH would be 2.30 c. The final pH would be 12.08 d. The final pH woul...
##### How do you find the antiderivative of f(x)=x^6?
How do you find the antiderivative of f(x)=x^6?...