Doing math in R(Assignment 6)
Greetings Professor,
In this assignment #6, I did math problems that are continued by the previous assignment #5 by using matrices and building a diagonal using 'diag()' functions for the assignment. This is a brief explanation of the code and the functions that I used in this assignment 6.
1. In the first step, I assigned the values A and B and gave the matrices to that values, and entered the number of columns(2).
2. Then by using the "diag()" function, I calculated and built the diagonal matrix of the given values.
3. For the given matrix of ncol = 5, by using the 'diag()' and 'A+diag()' functions, I calculated and built the diagonal to get the desired results professor. Please check the code attached below professor.
In my GitHub repository, I posted my code and results in pictures and in file Professor. And this is my GitHub repository link:
https://github.com/Jahnavi193/Assignment6#assignment6
Thank you.
Comments
Post a Comment