课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

matrix: backsolve and forwardsolve

matrix: backsolve and forwardsolve

- [Instructor] If you simplify a system of linear equations, say with Gaussian elimination, you may wind up with an upper triangular matrix, and R provides backsolve to solve the system of equations. If you have a lower triangular matrix you can use forwardsolve. So let's take a minute to see how R does this, and how to set up for the solution. In the lower right hand corner I've provided a backsolve and a forwardsolve system of equations. You'll notice that the backsolve equation is an upper triangular matrix. The forwardsolve equations are in a lower triangular matrix. Let's start with backsolve and an upper triangular matrix. In order to solve this, I'll need to define this in terms that R can understand. And so I'm going to create a matrix called R, and into it I'm going to place a matrix, no surprise. And into that matrix, I'm going to place a vector. I'm going to define that vector as the numbers that I need for the…

内容