- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to solve Hermitian positive-banded matrix equation using Python SciPy?
The linear function named scipy.linalg.solveh_banded is used to solve the banded matrix equation. In the below given example we will be solving the banded system Hx = b where −
$$\mathrm{H} = \begin{bmatrix} 8 & 2-1j&0 &0 \ 2+1j & 5& 1j & -2-1j0\ 0 & -1j& 9& \ 0 & 0& -2+1j& 6 \end{bmatrix} \mathrm{b}=\begin{bmatrix} 1\ 1+1j\ 1-2j\ 0 \end{bmatrix}$$
For our example below, we will be putting the upper diagonal in the array hb −
Example
from scipy.linalg import solveh_banded hb = np.array([[0, 2-1j, 1j, -2-1j], [8, 5, 9, 6 ]]) b = np.array([1, 1+1j, 1-2j, 0]) x = solveh_banded(hb, b) print(x)
Output
array([ 0.07318536-0.02939412j, 0.11877624+0.17696461j, 0.10077984-0.23035393j, -0.00479904-0.09358128j])
- Related Articles
- Which linear function of SciPy is used to solve Hermitian positive-definite banded matrix equation?
- Which linear function of SciPy is used to solve a banded matrix equation?
- How to solve a circulant matrix equation using Python SciPy?
- How to solve triangular matrix equations using Python SciPy?
- Which linear function of SciPy is used to solve the circulant matrix equation?
- How to Solve Quadratic Equation using Python?
- How can we use the SciPy library to solve a Linear equation?
- Which linear function of SciPy is used to solve Toeplitz matrix using Levinson Recursion?
- Which linear function of SciPy is used to solve triangular matrix equations?
- How to generate a symmetric positive-definite matrix using Python Scikit-Learn?
- How to find the Eigenvalues and Eigenvectors of a square matrix using SciPy?
- Compute the eigenvalues of a complex Hermitian or real symmetric matrix in Python
- Finding determinant of a square matrix using SciPy library
- Finding inverse of a square matrix using SciPy library
- Solve a linear matrix equation or system of linear scalar equations in Python

Advertisements