subject

[MATLAB] Manipulate a matrix G =
[1 2 1 0 0 0 0
3 4 0 1 0 0 0
1 0 1 2 1 3 1
0 1 2 7 -1 2 1]
Manipulate a matrix: Do the following operations on matrix G created above in Problem 6.
(a) Extract the rst 3X3 submatrix from G and store it in the matrix H, that is, create a matrix
H =
[1 2 1
3 4 0
1 0 1]
by extracting the appropriate rows and columns from the matrix G.
(b) Create the matrix E obtained from H by replacing Hsub22 = 4 by 7. Do not enter E explicitly.
Hint: enter rst E=H; to create copy of the matrix H and then manipulate the matrix E. The
resulting matrix should be
E =
[1 2 1
3 7 0
1 0 1]
(c) Create the matrix F obtained by deleting the third column of the matrix H. Do not enter F
explicitly.
(d) What happens if you type G(:,:) and hit return? Do not include the output in your lab
report, but include a statement describing the output in words.
What happens if you type G(:) and hit return? Do not include the output in your lab report,
but include a statement describing the output in words.
(e) What happens if you type G(5,2) and hit return? Explain.
(f) What happens if you type max(G)? Explain. What happens if you type sum(G)? Explain.
(g) What happens if you type G(G>3) and hit return? Can you explain how MATLAB got that
answer? What happens if you type G(G>3) = 100 and hit return? Can you explain how
MATLAB got that answer?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
You know the right answer?
[MATLAB] Manipulate a matrix G =
[1 2 1 0 0 0 0
3 4 0 1 0 0 0
1 0 1 2 1 3 1
...
Questions
question
Computers and Technology, 22.11.2021 23:00
question
Social Studies, 22.11.2021 23:00
question
Mathematics, 22.11.2021 23:00
question
Business, 22.11.2021 23:00
Questions on the website: 13722360