i'm trying to figure out where i did a mistake by coding reducedEchelonForm.
local l:=1, m:=RowDimension(M),n:=ColumnDimension(M),i,j; # l current column
for i from 1 to m do # going trough every row item
if n<l then # ColumnDimension need to be bigger than current column
j:=i; # given current row item
while M[j,l]=0 do # search for first rom item unequal zero
if m<j then # end of row
if n<l then # end of rows and columns -> finish
M:= perm(m,n,j,i).M; #permute row j and i
if not(M[i,l]=0) then # multiply row i with M[i,l])^(-1)
for j from 1 to m do # subtract every row j with row i for M[j,l]-times
if not(j=i) then
l:=l+1; # increase l by 1, next iteration i increase either
Hint: perm(...),multiplikation(...) and addition(...) are the elementary matrices. They are working.
Now i got an error by running it:
Error, (in reduced) invalid left hand side in assignment
Can someone explain me these error? And maybe a hint what i need to fix in my code?