Mathcad programming question
I'm trying to write the code for the Gauss Elimination method of finding complex roots in matrices, but I can't figure out how to "add a line" at the end of my coding sequence...everytime I try it adds a new vertical line to the end of the last line I coded, instead of dropping down to the next line on existing vertical line of code.
nmind, I got it. You have to highlight the entire block of code that you want to continue on with, hit add line, which will erase everything you've done but add the line where you want it, then ctrl-z undo it, which puts everything back but has the selector bracket now around the work you want to continue, then click add line again.
PITA modeling software
PITA modeling software
Trending Topics
you have your i's and j's transposed:
i := 1
j := 1
while (i ≤ m and j ≤ n) do
Find pivot in column j, starting in row i:
maxi := i
for k := i+1 to m do
if abs(A[k,j]) > abs(A[maxi,j]) then
maxi := k
end if
end for
if A[maxi,j] ≠ 0 then
swap rows i and maxi, but do not change the value of i
Now A[i,j] will contain the old value of A[maxi,j].
divide each entry in row i by A[i,j]
Now A[i,j] will have the value 1.
for u := i+1 to m do
subtract A[u,j] * row i from row u
Now A[u,j] will be 0, since A[u,j] - A[i,j] * A[u,j] = A[u,j] - 1 * A[u,j] = 0.
end for
i := i + 1
end if
j := j + 1
end while
with out the value of u, you cannot even start the matrix root search
jeez you noob.....
JK I dont even have the slightest clue of what I even pasted in. just some garbage from wikipeedonyou.
i := 1
j := 1
while (i ≤ m and j ≤ n) do
Find pivot in column j, starting in row i:
maxi := i
for k := i+1 to m do
if abs(A[k,j]) > abs(A[maxi,j]) then
maxi := k
end if
end for
if A[maxi,j] ≠ 0 then
swap rows i and maxi, but do not change the value of i
Now A[i,j] will contain the old value of A[maxi,j].
divide each entry in row i by A[i,j]
Now A[i,j] will have the value 1.
for u := i+1 to m do
subtract A[u,j] * row i from row u
Now A[u,j] will be 0, since A[u,j] - A[i,j] * A[u,j] = A[u,j] - 1 * A[u,j] = 0.
end for
i := i + 1
end if
j := j + 1
end while
with out the value of u, you cannot even start the matrix root search
jeez you noob.....
JK I dont even have the slightest clue of what I even pasted in. just some garbage from wikipeedonyou.


