eigenvalue

    0熱度

    1回答

    我想從數值上獲得一些厄密矩陣的基態能量(參見下面代碼中這個矩陣的定義)並且用矩陣參數「相位」 。 import scipy.sparse as sparse import scipy import numpy import numpy as np import math from scipy.special import binom import cmath import sympy

    0熱度

    2回答

    當前在Laravel中運行查詢,但預期的輸出不正確。所以,看來我仍然不知道使用where/orwhere的正確方法。我在下面有兩個查詢; QUERY圖1(a) //total friends $user = Friend::select('friend_sender', 'friend_receiver') ->where('friend_sender', Input::

    1熱度

    1回答

    我使用apache.commons.math3庫來計算一個3x3矩陣的特徵向量,但對於計算特徵向量的特徵分解方法將返回錯誤的結果:這是我的代碼: double[][] matrix = { {1 ,3 ,2}, {1 ,4 ,3}, {2 ,1 ,0} }; RealMatrix realMatrix = MatrixUtils.cr

    0熱度

    1回答

    A是N乘N矩陣。 I是(N-2)乘以(N-2)的單位矩陣。 B是另一個N乘N矩陣,其被定義爲 B=[I 0 0; 0 0 0; 0 0 0] 。 x是一個有N個元素的數組。如何解決以下形式的本徵值 甲X = C 乙X,其中c是本徵值, 通過使用特徵值求解器?

    5熱度

    1回答

    我正在嘗試計算大小爲3x3的符號複數矩陣M的特徵值。在某些情況下,eigenvals()完美。例如,下面的代碼: import sympy as sp kx = sp.symbols('kx') x = 0. M = sp.Matrix([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]) M[0, 0] = 1. M[0, 1] = 2./3.

    1熱度

    1回答

    我以前從未使用python,但現在需要它,因爲我正在處理同事的項目。我想繪製矩陣的特徵值作爲矩陣的元素的功能,也就是我的矩陣看起來像 M=[[40,0,4],[0,0,4],[4,4,x]] 其中x是一個變量。所以矩陣有三個特徵值 eig=numpy.linalg.eigvals(M) eig1=eig[0] eig2=eig[1] eig3=eig[0] 但

    1熱度

    2回答

    我正在使用f.semantic_fields_for與haml 這裏是當前的片段。 %ul.documents =f.semantic_fields_for :documents do |u| = link_to(u.object.comment.presence || u.object.file.original_filename, u.object.file.url

    -1熱度

    1回答

    如何構造具有相同對角元素的兩個正半定矩陣?假設M1和M2是兩個psd矩陣。我想要對角線(M1)和對角線(M2)的矢量相同。非對角元素必須有所不同。 [a e f g] [a s t u] [e b h i] [s b v w] [f h c j] [t v c x] [g i j d] [u w x d] 認爲第一個矩陣爲M1,第二個矩陣爲M2。請記住M1和M2都是PSD。 在此先感謝!

    1熱度

    1回答

    我想用scipy.sparse.linalg.eigsh使用shift-invert模式找到複雜矩陣的特徵值和特徵向量。在矩陣中只有實數,我可以得到與spicy.linalg.eigh求解器相同的結果,但是在添加虛部時,特徵值會發散。一個微小的例子: import numpy as np from scipy.linalg import eigh from scipy.sparse.linal

    0熱度

    1回答

    事先道歉,Python不是我的強項。 與矩陣的實際特徵值(如Python計算)相對應的特徵向量看起來不是特徵向量,而由Wolfram Alpha計算的特徵向量似乎可行。 (我的同事證實,同一病理執行R中的計算時,雖然我沒有成績單似乎是這樣。)代碼片段: >>> import numpy as np >>> in_matrix = np.array([[0.904, 0.012, 0.427],