Use fixed-point iteration to solve the following equation with x0=1
x=1+0.3*sinx
x0=1;
error=1;
while abs(error)>=1e-6
x1=1+0.3*sin(x0);
error=x1-x0;
x0=x1;
end
fprintf('%f\n',x0);
Cite As
Arthur Matlabus (2026). Fixed Point Iteration Method (https://www.mathworks.com/matlabcentral/fileexchange/167371-fixed-point-iteration-method), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
