[go: up one dir, main page]

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

Gauss Elimination Method: Input Program & Result

The document describes Gauss elimination method for solving systems of linear equations. It includes an input matrix and right hand side vector, the Gauss elimination program and result, and verification using matrix division. The program performs Gauss elimination to solve the system of equations and outputs the solution vector.

Uploaded by

YASH DOSHI
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)
32 views2 pages

Gauss Elimination Method: Input Program & Result

The document describes Gauss elimination method for solving systems of linear equations. It includes an input matrix and right hand side vector, the Gauss elimination program and result, and verification using matrix division. The program performs Gauss elimination to solve the system of equations and outputs the solution vector.

Uploaded by

YASH DOSHI
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

GAUSS ELIMINATION METHOD

Table of Contents
INPUT .............................................................................................................................. 1
PROGRAM & RESULT ...................................................................................................... 1
SOLVER .......................................................................................................................... 1

Name of the Student: Shubham Chapparghare Roll No:351013

INPUT
SC_GEM([20,1,-1;1,20,1;-1,-1,20],[20;22;18])

PROGRAM & RESULT


function[]=SC_GEM(a,d)

n=length(d);
for i=1:n
for k=i+1:n
f=a(k,i)/a(i,i);
for j=1:n
a(k,j)=a(k,j)-f*a(i,j);
end
d(k)=d(k)-f*d(i);
end
end
for i=n:-1:1
temp=d(i);
for j=i+1:n
temp=temp-a(i,j)*x(j);
end
x(i)=temp/a(i,i);
end
fprintf('x=%f\n',x);

x=1.000000
x=1.000000
x=1.000000

SOLVER
A=[20,1,-1;1,20,1;-1,-1,20];
D=[20;22;18];
X=A\D

X =

1
GAUSS ELIMINATION METHOD

1
1
1

Published with MATLAB® 8.0

You might also like