Matrix ops for 1
This commit is contained in:
parent
ab314c00ea
commit
a256f38a50
@ -5,8 +5,14 @@
|
||||
|
||||
## 1. Systems of Equations in Matrix Form
|
||||
# a. Use built-in R solve
|
||||
A <- matrix(c(2,3,4,3,2,-3,4,4,2),nrow=3)
|
||||
b <- matrix(c(3,5,9), nrow=3)
|
||||
|
||||
x <- solve(A,b)
|
||||
x
|
||||
|
||||
# b. Verify with matrix mult
|
||||
A%*%x == b
|
||||
|
||||
## 2. Matrix from polynomial
|
||||
# a. Create vector for x and y
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user