pseudopy icon indicating copy to clipboard operation
pseudopy copied to clipboard

Non Square matrix

Open kattakaha opened this issue 4 years ago • 0 comments

I want to find the pseudospectrum of a rectangular matrix but your code wants square error. I have read here by Trefethen that there is an algorithm.

import numpy as np
import matplotlib.pyplot as plt
from pseudopy import *
from scipy.linalg import eigvals

A = np.array([[1, 3, 2],
              [5, 3, 1],
              [3, 4, 5],
              [3, 4, 5]])
pseudo = NonnormalAuto(A, 1e-5, 1)
pseudo.plot([10**k for k in range(-1, 1)], spectrum=eigvals(A))
pyplot.show()

kattakaha avatar Apr 20 '21 19:04 kattakaha