0% found this document useful (0 votes)
28 views12 pages

MATLAB Numerical Methods Codes

The document is an assignment submitted to Dr. Azher Jameel by students Arzoo Angral, Piyush Kumar, and Anshul Jain from the National Institute of Technology, Srinagar. It covers various numerical methods in MATLAB, including Bisection, False Position, Fixed Point Iteration, Newton-Raphson, Secant, Gauss-Elimination, Gauss-Jordan, LU-Decomposition, and Gauss-Siedel methods, with examples and solutions provided for each method. The assignment outlines the structure and content with an index and page numbers for easy navigation.

Uploaded by

pk09nick02
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)
28 views12 pages

MATLAB Numerical Methods Codes

The document is an assignment submitted to Dr. Azher Jameel by students Arzoo Angral, Piyush Kumar, and Anshul Jain from the National Institute of Technology, Srinagar. It covers various numerical methods in MATLAB, including Bisection, False Position, Fixed Point Iteration, Newton-Raphson, Secant, Gauss-Elimination, Gauss-Jordan, LU-Decomposition, and Gauss-Siedel methods, with examples and solutions provided for each method. The assignment outlines the structure and content with an index and page numbers for easy navigation.

Uploaded by

pk09nick02
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

ASSIGNMENT

National Institute of Technology, Srinagar


Date:
Topic: MATLAB Codes for Numerical Methods

Submitted By: Arzoo Angral (2022BMEC026)


Piyush Kumar (2022BMEC016)
Anshul Jain (2022BMEC092)

Submitted To: Dr. Azher Jameel


INDEX
S. No Content Page No File
1. Bisection Method 1

2. False Position Method 2

3. Fixed Point Iteration Method 3

4. Newton Raphson Method 4

5. Secant Method 5

6. Gauss-Elimination Method 6
7. Gauss-Jordan Method 7

8. LU -Decomposition Method 8

9. Gauss-Siedel method 9
1. Bisection Method

Example: f (𝑥) = 𝑥 3 − 𝑥 2 + 1 where our initial values are [-1,1] should be correct up to 3
decimal places and let’s take maximum number of iterations be 6.

Solution:
2. False Position Method (Regula-Falsi
Method)

Example: f (𝑥) = 𝑥 3 − 2𝑥 − 5 where our initial values are [2,3] should be correct up to 3
decimal places, accuracy of 0.02% and let’s take maximum number of iterations be 10.
3. Fixed Point Iteration Method

Example: f (𝑥) = 𝑥 3 + 2𝑥 2 − 1 where our initial guess is 1 should be correct up to 3 decimal


places, accuracy of 𝜖𝑎 < 0.001 and let’s take maximum number of iterations be 10.

Solution:
4. Newton-Raphson Method

𝑥 𝜋
Example: f (𝑥) = sin 𝑥 − 2 ,where our initial guess is 2 should be correct up to 3 decimal places,
accuracy of up to 10−4 and let’s take maximum number of iterations be 10.

Solution:
5. Secant Method

Example: f (𝑥) = 𝑒 −𝑥 − 𝑥 ,where our initial guesses are 0 and 1 should be correct up to 3
decimal places, accuracy of up to 10−4 and let’s take maximum number of iterations be 10.

Solution:
6. Gauss Elimination Method

Example: Solve the system using Gauss elimination:

Solution:
7. Gauss-Jordan Method

Example:

Solution:
8. LU Decomposition Method

Example:

Solution:
9. Gauss – Siedel Method

Example:

Solution:

You might also like