سلام
من دنبال برنامه ماتریس Row echelon form با هر نوع زبانی بودم که در سایت
http://en.wikipedia.org/wiki/Row_echelon_form
این برنامه را پیدا کردم حالا نمیدنم با چه زبانی نوشته شده(c ,matlab ....؟؟؟) کسی اگر میدونه کمک کنه!
function ToRowEchelonForm(Matrix M) is
nr := number of rows in M
nc := number of columns in M

for 0 ≤ r < nr do
allZeros := true
for 0 ≤ c < nc do
if M[r, c] != 0 then
allZeros := false
exit for
end if
end for
if allZeros = true then
In M, swap row r with row nr
nr := nr - 1
end if
end for

p := 0
while p < nr and p < nc do
label nextPivot:
r := 1
while M[p, p] = 0 do
if (p + r) <= nr then
p := p + 1
goto nextPivot
end if
In M, swap row p with row (p + r) <-- bug. nr < p+r at this point
r := r + 1
end while
for 1 ≤ r < (nr - p) do
if M[p + r, p] != 0 then
x := -M[p + r, p] / M[p, p]
for pc < nc do
M[p + r, c] := M[p , c] * x + M[p + r, c]
end for
end if
end for
p := p + 1
end while
end function