MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Switch rows!


Hi!

I have another question. While I was writting a
program for partial pivoting, I used a program bellow
for switching rows in a matrix. It works fine, when I
use it separetly, but if I include it into a programm,
it returns an error. I believe this is because of the
BLOCK command, or am I wrong? How can it be changed,
so that it would fit my programm?
I am looking forward on your answer and am thanking
you in advance!

Regards,
Rebeka

Programm:
RowSwop[ matrix_, row1_, row2_ ] := 
Block[{temp = matrix}, temp[[row1]] = matrix[[row2]]; 
    temp[[row2]] = matrix[[row1]]; temp ] 

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/


  • Prev by Date: RE: How To Change A Rule
  • Next by Date: Re: polar curve
  • Previous by thread: Mathematica returns empty set when I expect two different values
  • Next by thread: Re: Switch rows!