Skip to content

Amirbehnam1009/Linear-Algebra-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Under The Supervision of Prof.Morteza Haghir Chehreghani

Spring 2021

Linear Equations Solver with LU Decomposition (Project 1)

This repository contains Python code to solve systems of linear equations using LU decomposition and forward/backward substitution. The LU decomposition method allows for efficient solving of multiple systems of equations with the same coefficient matrix A but different vectors b.

Requirments

  • Python 3.x
  • NumPy library

Input Format

The input format for the main script is as follows:

The first line contains two integers, n and m, where n is the size of the square matrix A (n x n) and m is the number of different vectors b to solve for. The next n lines contain the rows of matrix A. The following m lines each contain the elements of a vector b.

Output Format

The output of the main script consists of m lines, where each line contains the solution vector x for the corresponding vector b, printed up to 4 decimal places.

Example

Input:

3 5

5 6 2

4 5 2

2 4 8

18 7 2

4 5 8

15 7 6

11 9 5

13 12 12

Output:

75.0 -64.0 13.5

-14.0 13.0 -2.0

53.0 -45.0 10.0

0.5 1.5 -0.25

-10.0 11.0 -1.5

Denoising Bitcion Price Diagram by Least Squares Method (Project 2)

Simulated Result

IMG-20210619-WA0000

Compressing Bitmap Image Files by SVD Decomposition Technique (Project 3)

How To Run

Enter the path of the image( make sure its in .bmp format)

Simulated Result

This is for image 1, the same can be done for others:

IMG-20210709-WA0000

Releases

No releases published

Packages

No packages published