Question

2. Write the output matrix “v” t = [2:4]; k = [1:3]; v = t.*k –...

2. Write the output matrix “v”

t = [2:4];

k = [1:3];

v = t.*k – k.^2

4. Given: D = [1 2 3 4 5 6 7 8 9] (3x3) . Which command will extract the submatrix [1 2 3 4 5 6] (2x3) ?

a. D[1:2,1:3]

b. D(1,2 ;1,3)

c. [D(1:2),D(1:3)]

d. D(1:2,1:3)

14. What will be the dimension of matrix B?

B=[ones(3) zeros(3) rand(3); 2*eye(9)]

18. Find the value of “C”

A=1:2:10;

B=linspace(1,5,5);

C = length(A)*B(2)+A(5)*B(3);

19. Matrix A is defined: A = [−1 2 −3 0 2 4 2 −2 3](3x3) Which command deletes the second row?

21. What is the value of C?: ______________________

A=[1 2 3;4 5 6; 7 8 9];

B=[1 3; 5 7];

C=sum(B(:,1)+A(1:2,2));

22. What is the value of C?:

A=[1 2 3;4 5 6; 7 8 9];

B=[1 3; 5 7];

D=B(1,:).*A(2,2:3);

25. Using “subplot(m,n,p)” command create a figure window which will plot x ∙ sin(x) and cos(x+2), side by side in the same figure window. The vector x ∈ [−pi, pi], has 50 elements. x=___________________________;

subplot(____________); _________________________

subplot(____________); _________________________

Homework Answers

Answer #1

Answer 2: v = [1 2 3]

//v is a 1x3 matrix

Answer 4: option d  D(1:2,1:3)

Answer 14: dimensions of B are [12x9]

Answer 18: value of C is 37

Answer 19: A(2,:) = [ ]

  %empty square brackets, above command delets the second row of matrix A

Answer 21 : value of C is 13

Answer 22: value of D is D = [5 18] (1x2)

Answer 25:  x = linspace(-pi,pi,50); %generates vector of 50 values from -pi to pi
y1 = sin(x);
y2 = cos(x+2);
grid on
subplot(1,2,1); %plots sin(x) graph
plot(x,y1);
subplot(1,2,2); %plots cos(x+2) graph
plot(x,y2);
title('sin(x) and cos(x+2)');

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
#2. For the matrix A =   1 2 1 2 3 7 4 7...
#2. For the matrix A =   1 2 1 2 3 7 4 7 9   find the following. (a) The null space N (A) and a basis for N (A). (b) The range space R(AT ) and a basis for R(AT ) . #3. Consider the vectors −→x =   k − 6 2k 1   and −→y =   2k 3 4  . Find the number k such that the vectors...
Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write...
Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write a list comprehension to extract the first column of the matrix [1, 4, 7]. Write another list comprehension to create a vector of twice the square of the middle column.
Consider the matrix A= −2−2 6] [−2−3 5] [3 4−8] [−7−9 18 (all one matrix) (a)...
Consider the matrix A= −2−2 6] [−2−3 5] [3 4−8] [−7−9 18 (all one matrix) (a) How many rows ofAcontain a pivot position? (b) Do the columns ofAspanR4? (c) Does the equationA ~x=~b have a solution for every~b∈R^4? (d) Would the equation A~x=~0 have a nontrivial solution? (e) Are the columns of A linearly independent? (~x is vector x)
Following is a preview of the matrix x: Code: [,1] [,2] [,3] [1,] 1 3 5...
Following is a preview of the matrix x: Code: [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 Write the code that return the output: [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 [3,] 7 8 9
2. Consider a ten-sided die of which the sides display the numbers 1, 2, 3, and...
2. Consider a ten-sided die of which the sides display the numbers 1, 2, 3, and 4 according to this table: side of die 1 2 3 4 5 6 7 8 9 10 number displayed 1 1 1 1 2 2 2 3 3 4 Rolling two such dice is an experiment with the sample space S =       (1,1) (1,2) (1,3) (1,4) (2,1) (2,2) (2,3) (2,4) (3,1) (3,2) (3,3) (3,4) (4,1) (4,2) (4,3)...
Write a java 3x3 matrix program that does the following: 1) multiply 2)add 3)subtract 4)scalar product...
Write a java 3x3 matrix program that does the following: 1) multiply 2)add 3)subtract 4)scalar product 5)does calculation for a^3 - b^3 6)does calculation for 2a^ + 3b^2 an example for the adding method will look something like this public static double[][] multiplyMatrix(double [][] a, double [][] b)
1. Let T = {(1, 2), (1, 3), (2, 5), (3, 6), (4, 7)}. T :...
1. Let T = {(1, 2), (1, 3), (2, 5), (3, 6), (4, 7)}. T : X -> Y. X = {1, 2, 3, 4}, Y = {1, 2, 3, 4, 5, 6, 7} a) Explain why T is or is not a function. b) What is the domain of T? c) What is the range of T? d) Explain why T is or is not one-to one?
Refer to the following matrices. A = 1 −8 7 −3 −18 6 5 8 6...
Refer to the following matrices. A = 1 −8 7 −3 −18 6 5 8 6 0 5 8 3 4 8 −2     B = 4 −7 4 0 1 4 9 5 3 −3 0 9 C = 1 0 3 2 8     D = 1 9 −7 0 What is the size of each matrix? A     ____× ____ B     _____× _____ C     ____× ____ D     ____× _____
n x n matrix A, where n >= 3. Select 3 statements from the invertible matrix...
n x n matrix A, where n >= 3. Select 3 statements from the invertible matrix theorem below and show that all 3 statements are true or false. Make sure to clearly explain and justify your work. A= -1 , 7, 9 7 , 7, 10 -3, -6, -4 The equation A has only the trivial solution. 5. The columns of A form a linearly independent set. 6. The linear transformation x → Ax is one-to-one. 7. The equation Ax...
LINEAR ALGEBRA For the matrix B= 1 -4 7 -5 0 1 -4 3 2   ...
LINEAR ALGEBRA For the matrix B= 1 -4 7 -5 0 1 -4 3 2    -6 6    -4 Find all x in R^4 that are mapped into the zero vector by the transformation Bx. Does the vector: 1 0 2 belong to the range of T? If it does, what is the pre-image of this vector?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT