suppose have system of equations (5 equations , 2 variables) this:
ax + = c ab <- matrix(runif(10), 5) c <- c(5, 10, 15, 20, 25)
how plot system of equations in r, without first manually converting
y = (c - ax) / b
are looking this?
set.seed(101) ab <- matrix(runif(10), 5) c <- c(5, 10, 15, 20, 25) x = seq(-70,70,1) plot(x, (c[1] - ab[1,1]*x)/ab[1,2], col=1, type="l", ylim=c(-100,200)) (i in 2:nrow(ab)) { lines(x, (c[i] - ab[i,1]*x)/ab[i,2], col=i, type="l") }
Comments
Post a Comment