help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a Jacobi iterative method for Ax=b


From: Ozzy Lash
Subject: Re: Implementing a Jacobi iterative method for Ax=b
Date: Sun, 28 Oct 2012 19:38:25 -0500

On Sun, Oct 28, 2012 at 6:58 PM, Joza <address@hidden> wrote:
> Since I permute A's rows using dmperm, how do I also permute b in the same
> way?
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/Implementing-a-Jacobi-iterative-method-for-Ax-b-tp4645833p4645857.html
> Sent from the Octave - General mailing list archive at Nabble.com.


It has been a long time since I did anything like this, but since you
are only permuting the rows of A, I think you only need to permute the
rows of b in the same way, and x will still be ok.  If you were
permuting both rows and columns of A, you would need to permute the
rows of b in the same way that you permute the rows of A, and
"unpermute" the x vector to undo the permutation of the columns of A.
That is only from memory and a little Sunday evening thinking, so I
could have that mixed up.

Since you only need to permute b, you could, where you have:

 W = A(dmperm(A), :);

You could put:

P=dmperm(A);
W=A(P,:);
bp=b(p);

And then do your calculations with bp instead of b


reply via email to

[Prev in Thread] Current Thread [Next in Thread]