Skip to content
/ NGE Public

Naive Gauss Elimination on matlab and solve Ax=b simultaneous equation model

Notifications You must be signed in to change notification settings

GaoRy-127/NGE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

NGE

Naive Gauss Elimination on matlab and solve Ax=b simultaneous equation model

Basic Idea

The Psedocode of this code is

Discription

  • First

    Get Matrix A and b.

         coe = readmatrix('A.xlsx');     
         con = readmatrix('b.xlsx');
    

    In this way you should make 'Excel file' and input values there. That's what I do.

    Or You can get A and b directly

         coe = [A1 A2 A3 (...); (...); ];     
         con = [b1 ; b2; b3; (...) ];  
    
  • Second

    Program will run and show Upper Triangular Matrix and and answer

  • Third

    Actually, there is better way to solve simultaneous equation You can use "backslash \"

         Xprof= (coe\con).' 
    

    If you add this line to your script file, you can see that answer is same.

Others..

  • I uploaded only function m-file. So, you should write your own script m-file.
  • I made this code to do my college assignment.
  • I use Excel to input values, because it is inconvenient to enter a matrix in a matlab.
  • I am hoping that my code can help other undergraduate students' assignments.

About

Naive Gauss Elimination on matlab and solve Ax=b simultaneous equation model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages