From b3f3a8ecd454359a2e992161844f2fb599f8238a Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Fri, 4 Oct 2019 12:24:07 +0530 Subject: Initial commit/added all books --- Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5/Ex1_3_5.R | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5/Ex1_3_5.R (limited to 'Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5') diff --git a/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5/Ex1_3_5.R b/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5/Ex1_3_5.R new file mode 100644 index 00000000..c0a2bc07 --- /dev/null +++ b/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.5/Ex1_3_5.R @@ -0,0 +1,18 @@ +#Example 3.5,chapter 1,section 1.3,page 25 +#package used matlib v0.9.1 +#install package using command: install.packages("matlib") +#Github reposiory of matlib :https://github.com/friendly/matlib + +#installation and loading library +#install.packages("matlib") +library("matlib") + +#program +A <- matrix(c(7,8,0,0,0,1,1,3,-7,-5,-3,-6,0,-2,0,-1),ncol=4) +b <- c(0,0,0,0) +Ab <- cbind(A,b) +Ab <- rowadd(Ab,1,2,-8/7) +Ab <- rowadd(Ab,2,3,-1) +Ab <- rowadd(Ab,2,4,-3) +Ab <- rowadd(Ab,3,4,-5/2) +Ab \ No newline at end of file -- cgit