Unformatted text preview: for i = 1:10 A = 3*x(i)^24*x(i)6; delta = x(i)^3 2*x(i)^2  6*x(i) + 3; x(i+1) = x(i)  (1/A)*delta; end; root = x(i) r %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Part c: GaussSeidel with first guess x=1 x(1) = 1; A = 5; disp('GaussSeidel iteration on polynomial, first guess x=1') for i=1:10 delta = x(i)^3 2*x(i)^2  6*x(i) + 3; x(i+1) = x(i)  (1/A)*delta; end; root = x(i) r %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Part d: NewtonRaphson with first guess x=1 x(1) = 1; disp('NewtonRaphson iteration on polynomial, first guess x=1') for i = 1:10 A = 3*x(i)^24*x(i)6; delta = x(i)^3 2*x(i)^2  6*x(i) + 3; x(i+1) = x(i)  (1/A)*delta; end; root = x(i) r...
View
Full Document
 Summer '10
 Tomsovic
 Electrical Engineering, Numerical Analysis, guess x=3

Click to edit the document details