Write program to Find Fixed point iteration Numerical Analysis (Matlab) Write pr
ID: 3010338 • Letter: W
Question
Write program to Find Fixed point iteration
Numerical Analysis (Matlab)
Write program to Find Fixed point iteration clear; %Define g(x) %Define initial guess as first entry in array p. %As p is an array, p(0) does not exist. %Hence, we need to define p(1) as initial guess p_0 P(1) = ???; %Define tolerance tolerance=???; %Define error to be some value > tolerance. error=???; %Define j = 1 as starting point for "counter" in loop %Create while loop for fixed point iteration, while P(j + 1) = ???; ???; ???; end p %Displays array p error %Displays difference between last two approx.Explanation / Answer
z(1) = 0.75;
for n = 1:20
z(n+1) = (5-z(n)^3)/5;
x(n) = z(n+1);
end
plot(x, '+r');
xlabel('Iteration n');
ylabel('x(n)');
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.