Giter Site home page Giter Site logo

gausianelimination's Introduction

Gausian Elimination

This is a C program that solves a system of linear equations using Gaussian Elimination. Work carried out as part of the numerical algorithms discipline.

Summary

Overview

This program implements the Gaussian Elimination algorithm to solve a system of linear equations in the form of Ax = b, where A is a square matrix, x is the solution vector, and b is the right-hand side vector.

Usage

  1. Create an input file containing the linear system you want to solve.
  2. Run the program, passing the input file as a command-line argument.
./gausianElimination linearSystem.dat

File Format

The input file should follow the format described below:

  1. The first line should contain a single integer n, representing the dimension of the square matrix A.
  2. The next n lines should contain n space-separated values, representing the elements of the matrix A.
  3. The final line should contain n space-separated values, representing the elements of the vector b.

Example input file:

3
5.0 2.0 1.0
2.0 -1.0 3.0
0.0 1.0 -2.0
8.0 9.0 -6.0

The file above represents the following linear system:

$$\begin{cases} 5x + 2y + z = 8 \\\ 2x - y + 3z = 9 \\\ y - 2z = -6 \end{cases}$$

Compilation

Use make to compile the program:

make release

Debugging

It is also possible to generate a debug version that better describes the steps performed:

make debug

gausianelimination's People

Contributors

rafa3lp avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.