Question

Problem 5 Create the following matrix by typing elements explicitly one command. Do not type individual 0 00 0 0 o o 0 0 0 0

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Single MATLAB command that creates matrix E without typing individual elements explicitly is,

E(2:4,3:5)=[1:3;4:6;7:9]

MATLAB output:

E =

0 0 0 0 0
0 0 1 2 3
0 0 4 5 6
0 0 7 8 9

Single MATLAB command that creates matrix F without typing individual elements explicitly is,

>> F(2:4,3:5)=[(1:3)',(10:-2:6)',(20:6:32)']

MATLAB output:

F =

0 0 0 0 0
0 0 1 10 20
0 0 2 8 26
0 0 3 6 32


answered by: ANURANJAN SARSAM
Add a comment
Know the answer?
Add Answer to:
Problem 5 Create the following matrix by typing elements explicitly one command. Do not type individual...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • using matlab Create the following matrix B. [18 17 16 15 14 13] 12 11 10...

    using matlab Create the following matrix B. [18 17 16 15 14 13] 12 11 10 9 8 7 6 5 4 3 2 1 Use the matrix B to: (a) Create a six-element column vector named va that contains the elements of the second and fifth columns of B. (6) Create a seven-element column vector named vb that contains elements 3 through 6 of the third row of B and the elements of the second column of B. Create...

  • 4. Create a variable N that is a column vector with seven equally spaced elements in...

    4. Create a variable N that is a column vector with seven equally spaced elements in which the first element is 44 and the last element is 23. 5. Create the following three row vector: a=[5 8-10 2], b=[4 19 -2 3], and c=[-35 06 1]. a) Use the three vectors in Matalb command to creat 3x5 matrix in which the rows are the vectors c, b and a, respectively. b) Use the three vectors in a Matalb command to...

  • 2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate...

    2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate the sum of the first row of B Evaluate the maximum value in the vector resulting from element-by-element multiplication of the first column of B with the third column of A. Use element-by-element division to divide the third row of A by the first three elements of the second column of B and evaluate the sum of the elements of the resulting vector.

  • Write a program that reads a matrix from the keyboard and displays the summations of all...

    Write a program that reads a matrix from the keyboard and displays the summations of all its rows on the screen. The size of matrix (i.e. the number of rows and columns) as well as its elements are read from the keyboard. A sample execution of this program is illustrated below: Enter the number of rows of the matrix: 3 Enter the number of columns of the matrix: 4 Enter the element at row 1 and chd umn 1: 1...

  • Q 9 to 12 on matlab Create the following matrix by using vector notation for creating...

    Q 9 to 12 on matlab Create the following matrix by using vector notation for creating vectors with 9 constant spacing and/or the iinspace command. Do not type individual elements explicitly 20 3 в - 4 03 Using the colon symbol, create a 4 x 6 matrix (assign it to a variable named Anine) in which all the elements are the mumber 9. 10Create the following matrix by typing one command. Do not type individual elements explicitly C o o...

  • How is Problem 1 (a through e) typed up in Matlab? I would like to know...

    How is Problem 1 (a through e) typed up in Matlab? I would like to know how the commands is typed up along with solution please. Assignment 6 Problem 1) Consider the two following matrix, 1 4 2 2 4 100 and B In(A) 7 9 7 3 42 a) Select just the second row of B. b) Evaluate the sum of the second row of B. c) Multiply the second column of B and the first column of A...

  • 47. For a matrix A(:, m:n) refers to _ a. Refers to the elements in all...

    47. For a matrix A(:, m:n) refers to _ a. Refers to the elements in all the rows of column n of the matrix A. b. Refers to the elements in all the rows between columns m and n of the matrix A. c. Refers to the elements in all the columns between rows m and n of the matrix A. d. Refers to the elements in all the columns of row n of the matrix A. 48. What does...

  • Need help with this MatLab exercise. Please show all commands in MatLab. Enter the following matrices...

    Need help with this MatLab exercise. Please show all commands in MatLab. Enter the following matrices and vectors in MATLAB [ 2 -6 3 ] [ 5 ] -3 A= 2 -7 -2 , B= 2 -2 -3 , b= -13 , c= 3 -1 4], d= 0 [ 7 -2 7 [1 -8 -1 ] [ 10 (a) Perform the following operations: AB, BA, CA and Bd (use standard linear algebra multiplication). - 3 (b) Construct a 6 x...

  • Create a matrix with 3 rows and 4 columns. Every element in the first row should...

    Create a matrix with 3 rows and 4 columns. Every element in the first row should be 0, every element in the second row should be 1, and every element in the third row should be 2. But don’t just type out all the numbers. Use some ingenuity. Display the matrix using MATLAB.

  • Matlab 1 question help Question5 Given X [ 3 562; 189 6; 4071], write MATLAB command...

    Matlab 1 question help Question5 Given X [ 3 562; 189 6; 4071], write MATLAB command to do the following operations: a) Multiply the value of the elements in first and third rows and second and fourth columns by 3 and store it in another matrix, what will be its value b) Calculates the number of the elements in each column greater than 5 c) Get the min number in the second column

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT