Group Abstract Group Abstract

Message Boards Message Boards

How to Reduce Number of Iteration of Gradient Iterative Method

Posted 12 years ago

Hi All,

I want to solve a 5x5 matrix using gradient iterative method. After ~34000 iteration I got result in given stopping tolerance. But can we modify/improve my iteration so that we can find solution in less iteration say 30000 steps?

I have attached my code.

Thanks in advance,

Selahittin..

Attachments:
POSTED BY: selahittin cinar
5 Replies

Hi Daniel,

I used what you said and attached it.

But it is soooo fast!!! why is that?

Thank you so much..

Selahittin..

Attachments:
POSTED BY: selahittin cinar
POSTED BY: Daniel Lichtblau
Attachments:
POSTED BY: selahittin cinar
POSTED BY: Daniel Lichtblau

Flatten b so it is a vector, get rid of all the transposing because it's not needed for vector multiplication, define iP=Inverse[P], and try this for the nesting iterations:

 (# + ((b - A. # ).(b - A.# )/(b - A.# ).A.(b - A.# )) iP.(b - A.# )) &
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard