Module # 6 Doing math in R part 2
VaShay Carpenter
Answer the following questions and post your answer on your blog:
1. Consider A=matrix(c(2,0,1,3), ncol=2) and B=matrix(c(5,2,4,-1), ncol=2).
a) Find A + B
b) Find A - B
2. Using the diag() function to:
build a matrix of size 4 with:
the following values in the diagonal 4,1,2,3.
3. Generate the following matrix:
Hint: You can use the command diag() to build it.
Github Link:
Comments
Post a Comment