#------------------------------------------------------------------
#QR Solver Function:
qr_solver <- function(A,b){
#Solves linear system Ax=b.
#Obtain QR decomposition of matrix A. Extract components.
QR <- qr(A)
Q <- qr.Q(QR)
R <- qr.R(QR)
#Backsolve for x.
x <- qr.solve(A,b)
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.