0% found this document useful (0 votes)
35 views3 pages

Numerical Analysis and Computation (LAB)

A lower triangular matrix is a matrix where all entries below the main diagonal are zero. A MATLAB program is presented to solve the forward substitution method for a lower triangular system of equations Ax=b. The program takes a lower triangular matrix A and right hand side vector b as inputs. It initializes the solution vector x as zeros and calculates each element of x by dividing the corresponding element of b by the diagonal entry of A, solving the equations from top to bottom.

Uploaded by

Baseer Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views3 pages

Numerical Analysis and Computation (LAB)

A lower triangular matrix is a matrix where all entries below the main diagonal are zero. A MATLAB program is presented to solve the forward substitution method for a lower triangular system of equations Ax=b. The program takes a lower triangular matrix A and right hand side vector b as inputs. It initializes the solution vector x as zeros and calculates each element of x by dividing the corresponding element of b by the diagonal entry of A, solving the equations from top to bottom.

Uploaded by

Baseer Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Numerical Analysis and

Computation (LAB)
GS-401L

(LAB 3)
Lower Triangular Matrix
A matrix in which all the entries below the main diagonal are zero is known as Lower
Triangular Matrix.
MATLAB Program
function X=fwdsub(A,B)
clc
clear all
A=[1 0 0 0;2 3 0 0;10 8 6 0; 7 8 9 10];
B=[6;8;4;10];
n=length(B);
X=zeros(n,1);
X(1,1)=B(1)/A(1,1)
for j=2:n
X(j,1)=(B(j)-A(j,1:j-1)*X(1:j-1))/A(j,j);
end

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy