Code Monkey home page Code Monkey logo

gaussian-elimination's Introduction

Gaussian-elimination

This C++/Python code implements the Gaussian elimination method to solve a system of linear equations.

Input:

1- The user specifies the number of unknowns (variables) in the system of linear equations.

2- The coefficients of the augmented matrix (including the right-hand side constants) are provided by the user.

Gaussian Elimination:

1-The program transforms the augmented matrix into an upper triangular form using Gaussian elimination.

2- It starts by checking if the diagonal element (pivot) is zero. If so, it exits with an error message.

3- For each row below the current row, it calculates a ratio and subtracts a multiple of the current row from the subsequent rows to make the elements below the pivot zero.

Back Substitution:

1- After obtaining the upper triangular matrix, the program solves for the unknowns using back substitution.

2- Starting from the last row, it calculates the value of each unknown by subtracting the known values of the other variables.

Output:

1- The solution (values of the unknowns) is displayed after performing the calculations.

Contact

Send any queries to Reza Nopour ([email protected]).

gaussian-elimination's People

Contributors

nopour avatar

Stargazers

 avatar  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.