With one MATLAB statement/command, create a variable named matrix 0 and assign t
ID: 2079275 • Letter: W
Question
With one MATLAB statement/command, create a variable named matrix 0 and assign to it the following 3 times 3 square matrix. [924 561 192 -991 -221 807 550 -771 150] With one MATLAB statement/command, create a variable named matrix 1 and assign to it the following matrix. [3.58 -10.79 100 pi/2 eps -8.375 20 8.5 88.88 -1000 -20 -14.444 -8.8889 -3.3333 2.2222 7.77778 13.3333 18.8889 24.4444 30 -600 -500 -400 -300 -200 -100 0 100 200 300 -40 -36 -32 -28 -24 -20 -16 -12 -8 -4 0 1.1111 2.222 3.3333 4.4444 5.5556 6.6667 7.7778 8.8889 10] Utilize the MATLAB colon (:) operator and the built-in linspace () function whenever possible. Before moving on to the next step, inspect the output displayed in the MATLAB Command Window to ensure the matrix is correct. (g) With one MATLAB statement, create a variable named matrix 2 and assign to it the following matrix made-up of the 1st and 3rd rows of matrix 0. [matrix 0_row1 matrix0_row3]Explanation / Answer
The code can be written by following codes in which we are creating a matrix by assigning row directly as row in new matrix.
matrix2=[matrix0(1,:);;matrix0(3,:)]
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.