Skip to content

Commit

Permalink
Fixing missing loop over k in LEQ
Browse files Browse the repository at this point in the history
  • Loading branch information
fverdugo committed Sep 27, 2024
1 parent 53ea3f5 commit 3a82bf9
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions notebooks/LEQ.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,17 @@
"\n",
"```julia\n",
"n,m = size(B)\n",
"for t in (k+1):m\n",
" B[k,t] = B[k,t]/B[k,k]\n",
"end\n",
"B[k,k] = 1\n",
"for i in (k+1):n \n",
" for j in (k+1):m\n",
" B[i,j] = B[i,j] - B[i,k]*B[k,j]\n",
"for k in 1:n\n",
" for t in (k+1):m\n",
" B[k,t] = B[k,t]/B[k,k]\n",
" end\n",
" B[k,k] = 1\n",
" for i in (k+1):n \n",
" for j in (k+1):m\n",
" B[i,j] = B[i,j] - B[i,k]*B[k,j]\n",
" end\n",
" B[i,k] = 0\n",
" end\n",
" B[i,k] = 0\n",
"end\n",
"```"
]
Expand Down Expand Up @@ -527,15 +529,17 @@
"\n",
"```julia\n",
"n,m = size(B)\n",
"for t in (k+1):m\n",
" B[k,t] = B[k,t]/B[k,k]\n",
"end\n",
"B[k,k] = 1\n",
"for i in (k+1):n \n",
" for j in (k+1):m\n",
" B[i,j] = B[i,j] - B[i,k]*B[k,j]\n",
"for k in 1:n\n",
" for t in (k+1):m\n",
" B[k,t] = B[k,t]/B[k,k]\n",
" end\n",
" B[k,k] = 1\n",
" for i in (k+1):n \n",
" for j in (k+1):m\n",
" B[i,j] = B[i,j] - B[i,k]*B[k,j]\n",
" end\n",
" B[i,k] = 0\n",
" end\n",
" B[i,k] = 0\n",
"end\n",
"```\n",
"\n",
Expand Down

0 comments on commit 3a82bf9

Please sign in to comment.