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

Find the areas of a group of triangles whose base varies from 0 to 10 m and whos

ID: 643386 • Letter: F

Question

Find the areas of a group of triangles whose base varies from 0 to 10 m and whose height varies from 2 to 6 m. 10. What do the following commands do? A. Flip a matrix vertically B. flips a matrix into its mirror image, from left to right C. creates a matrix of ones sum D. maps vectors into a two- dimensional array E. extracts the diagonal from a matrix or creates a matrix using a vector for the values along the diagonal, filling in the other elements with zeros F. transposes a matrix (rows become columns and vice versa) G. creates a magic matrix H. adds up the numbers in each column of a matrix

Explanation / Answer

9. Answer is C.

That is

[B,H]=meshgrid(base,height);

area=0.5*B.*H

base,height are the grid vectors.

B,H are the two output arrays that specifies the full grid

area can calculate areas of group of triangles from B,H.

10.

1.diag : creates diagonal matrix or gets the diagonal matrix, answer is E.

2.fliplr : flip matrices left to right, answer is B.

eg: X=1 3 5 7 8 9 0

fliplr(X)=0 9 8 7 5 3 1

  3.flipud : flip array up to down, answer is A.

eg.: A=

1

2

3

4

   5

flipud(x)=

5

4

3

2

1

4. ' : used to transpose of the matrix, Answer is F

   5. sum : It returns the sum of each column in the matrix.

  eg.: A =

1 2 3

4 5 6

sum(A) = 5 7 9

if it is a vector it returns the sum of elements

eg., A=[1,2,4,5]

sum(A)=12

Answer is H

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