I took this code from i have a viva tomorrow plz explain me the code
Show older comments
clear X A=input ('please enter the Matrix :') b=[8;4;5]
tol = 1.e-8; maxiter = 100; relerr = inf; niter = 1; S = diag( diag(A) ); display (S) T = S - A; display (T)
X(:,1) = zeros(size(b)); while relerr > tol & niter< maxiter, X(:,niter+1) = S \ (b+T*X(:,niter)); relerr = norm(X(:,niter+1)-X(:,niter),inf)/norm(X(:,niter+1),inf); niter = niter+1; end display (niter) display (X(:,niter))
Accepted Answer
More Answers (1)
FYP
on 26 Mar 2012
0 votes
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!