can you use bicg with initial guess but without preconditioner. If so, how do you call it?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Stopa
am 25 Mär. 2016
Kommentiert: Michael Stopa
am 30 Mär. 2016
can you use bicg with an initial guess, x0, but without specifying a preconditioner M or M1, M2?
0 Kommentare
Akzeptierte Antwort
Vidya Viswanathan
am 30 Mär. 2016
Hi Michael,
I believe you can specify the initial guess without specifying the preconditioner. In place of the preconditioner, just pass '[]'. For example,
n = 100;
on = ones(n,1);
A = spdiags([-2*on 4*on -on],-1:1,n,n);
b = sum(A,2);
tol = 1e-8;
maxit = 15;
x0=zeros([n 1]);
x = bicg(A,b,tol,maxit,[],[],x0);
NOTE: The above example is just to let you know that it is syntactically possible to pass the initial guess to the function "bicg" without the preconditioner. The initial guess that I have used above is purely random and does not have a correlation with the underlying mathematics.
I hope this answers your question.
Regards,
Vidya
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!