# chex32.r J F Monahan August 2007 # # Example 3.2 Solve a general system of linear equations # A <- matrix( c(1,.5,0,1, 2,1,2,-1, -1,0,-.5,1.5, 0,1,1.5,0), 4, 4) # write it out A b <- c( .5, 1, 1.5, 2) # write it out b # solve equations x <- solve(A,b) # write it out x rm(list=ls()) # clean up