Deprecated: Assigning the return value of new by reference is deprecated in /customers/1/f/c/dahoiv.net/httpd.www/programmering/wp-includes/cache.php on line 36 Deprecated: Assigning the return value of new by reference is deprecated in /customers/1/f/c/dahoiv.net/httpd.www/programmering/wp-includes/query.php on line 21 Deprecated: Assigning the return value of new by reference is deprecated in /customers/1/f/c/dahoiv.net/httpd.www/programmering/wp-includes/theme.php on line 507 Steepest Descent Iteration

Steepest Descent Iteration

June 7th, 2008 by Daniel Høyer Iversen

Steepest Descent Iteration ,  written   in Matlab to solve the Advection-diffusion equation. The matrix A (in A x= b) is a block pentadiagonal matrix.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function Z = solver2(A,b)%Steepest Descent Iteration
 
p=params(0,0);
 
Z=p.noder(:,1)*5;
 
e=A(1,1);
 
for k=1:55000 %Gir feil på 0.2%, men bruker 36s
 
r=b-A*Z;
 
a= (r'*r)/((A*r)'*r);
 
Z=Z+a*r;
 
end
Do you want to use this code?

8 Responses to “Steepest Descent Iteration ”

  1. Claire

    Hi, I’m undergraduate student of mathematics.
    I’m very interesting with ur matlab code.
    May I take a copy?

    Thx b4.

  2. sagy

    I need to use the code for an assignment for one of my courses.

  3. perastikos

    hello
    where can i find the source code for nim problem?
    thanks a lot

  4. perastikos

    thanks for answer
    what about matlab language?

  5. vahi

    hi ,
    i am an undergraduate student in applied mathematics
    i want source code for gradient based optimization methods please can i get the steepest descent method, quasi newton method , newton method source cordes.

  6. I just could not depart your site before suggesting that I really loved the usual
    information a person provide for your visitors?

    Is going to be back incessantly in order to
    inspect new posts

  1. 1

    Salutations…

    I pondered sending this trackback great feature…

Leave a Response