Question: R Program 6. Using the help file for function diag() you can specify the dimensions of the output. Creat a 10 x 11 matrix which
R Program

6. Using the help file for function diag() you can specify the dimensions of the output. Creat a 10 x 11 matrix which has l's on the main diagonal. then add a row of zeros above the matrix to create a 11 x 11 matrix called A1 where the ones are offset a row below the main diagonal. Do the same and create a matrix A2 where the ones are offset one up from the diagonal. Add A1 and A2 with the matrix in the previous exercise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
