Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. Sort each column and store the result in an arrayB. b. Sort each row and stor

ID: 1890961 • Letter: A

Question

a. Sort each column and store the result in an arrayB.

b. Sort each row and store the result in an array C.

c. Add each column and store the result inan array D.

d.Add each row and store the result in an array E.




Please post the matlab commands and the answers to those commands

a. Sort each column and store the result in an arrayB. b. Sort each row and store the result in an array C. c. Add each column and store the result inan array D. d.Add each row and store the result in an array E. Please post the matlab commands and the answers to those commands

Explanation / Answer

B = sum(A) B = sum(A,dim) B = sum(..., 'double') B = sum(..., dim,'double') B = sum(..., 'native') B = sum(..., dim,'native') M = 8 1 6 3 5 7 4 9 2 This is called a magic square because the sums of the elements in each column are the same. sum(M) ans = 15 15 15 The sums of the elements in each row are also the same. You can sum the elements in each row by transposing M or by using the dim argument. Transposing M: sum(M') ans = 15 15 15 Using the dim argument: sum(M,2) ans = 15 15 15

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote