0% found this document useful (0 votes)
51 views2 pages

Experiment 3 - Fixed Point Iteration Method

The document contains MATLAB code to solve five numerical problems using iterative methods over 30 iterations. The code calculates the next value in each sequence using a function of the current value. It outputs the final values of each function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views2 pages

Experiment 3 - Fixed Point Iteration Method

The document contains MATLAB code to solve five numerical problems using iterative methods over 30 iterations. The code calculates the next value in each sequence using a function of the current value. It outputs the final values of each function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BEST

National University of Technology, Islamabad


Department of Mechanical Engineering
Course Code: ME3506 Course Name: Numerical Analysis Lab
Batch: 2020 Semester: Fall 2022
Instructor: Dr. Ubaid Ahmed Nisar Max Marks: 25

LAB REPORT 03

Student Name: Waqas Ali Registration No: F20602006

Question
No: 01

clc
clear all
x1(1)=1.5;
x2(1)=1.5;
x3(1)=1.5;
x4(1)=1.5;
x5(1)=1.5;
for i=1:30

g1(i) = x1(i) - (x1(i))^3 - 4*(x1(i))^2+10;


x1(i+1)=g1(i);

g2(i) = (10/x2(i) - 4*(x2(i)))^0.5;


MATLAB x2(i+1)=g2(i);
CODE
g3(i) = 0.5*(10-(x3(i)^3)^(0.5));
x3(i+1)=g3(i);

g4(i) = (10/(4+(x4(i))))^(0.5);
x4(i+1)=g4(i);

g5(i) = x5(i)-((x5(i)^3) + 4*(x5(i)^2) - 10)/((3*x5(i)^2) +


8*(x5(i)));
x5(i+1)=g5(i);
end
fprintf('g1=%f\t g2=%f\t g3=%f \t g4=%f\t
g5=%f\n',g1,g2,g3,g4,g5);
BEST
National University of Technology, Islamabad
Department of Mechanical Engineering
Course Code: ME3506 Course Name: Numerical Analysis Lab
Batch: 2020 Semester: Fall 2022
Instructor: Dr. Ubaid Ahmed Nisar Max Marks: 25

Output:

You might also like