Science:Math Exam Resources/Courses/MATH152/April 2017/Question A 15/Solution 1

From UBC Wiki

generates a matrix of zeros. changes the rd row of the matrix to . The ’for’ loop assigns a value of to the entries represented by and . Thus, the resulting matrix is .