c=c(5,3,1,2,1,1,1,4,3)
A=matrix(c,3,3)
A
EGauss<-function(A){
n=length(A[,1])
B=diag(1,n)
for (j in 1:(n-1)){
for ( i in (j+1):n){
m= A[i,j]/A[j,j]
A[i,]=A[i,]-m*A[j,]
A[i,j]=0
B[i,j]=m
}
}
return(list(L=A, R=B))
}
B=EGauss(A);B
To embed this project on your website, copy the following code and paste it into your website's HTML: