Main Content

inverse

ローラン行列の逆行列

R2021b 以降

    説明

    R = inverse(M) は、ローラン行列 M が非ゼロの単項式の行列式をもつ場合、M の逆行列を返します。

    すべて折りたたむ

    次のようにローラン多項式を作成します。

    • a(z)=z+1

    • b(z)=z2+z+z-1

    • c(z)=z

    • d(z)=z2+z-1

    lpA = laurentPolynomial(Coefficients=[1 1],MaxOrder=1);
    lpB = laurentPolynomial(Coefficients=[1 1 0 1],MaxOrder=2);
    lpC = laurentPolynomial(Coefficients=[1],MaxOrder=1);
    lpD = laurentPolynomial(Coefficients=[1 0 0 1],MaxOrder=2);

    行列 lmat = [a(z)b(z)c(z)d(z)] を作成します。lmat の行列式を求めます。

    lmat = laurentMatrix(Elements={lpA,lpB;lpC,lpD});
    det(lmat)
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 1
            MaxOrder: -1
    
    

    行列式は非ゼロの単項式です。lmat の逆行列を求めます。逆行列の成分を調べます。

    lmatinv = inverse(lmat);
    lmatinv.Elements{1,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: [1 0 0 1]
            MaxOrder: 3
    
    
    lmatinv.Elements{1,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: [-1 -1 0 -1]
            MaxOrder: 3
    
    
    lmatinv.Elements{2,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: -1
            MaxOrder: 2
    
    
    lmatinv.Elements{2,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: [1 1]
            MaxOrder: 2
    
    

    lmat とその逆行列の積が単位行列に等しいことを確認します。

    matprod = lmat*lmatinv;
    matprod.Elements{1,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 1
            MaxOrder: 0
    
    
    matprod.Elements{1,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 0
            MaxOrder: 0
    
    
    matprod.Elements{2,1}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 0
            MaxOrder: 0
    
    
    matprod.Elements{2,2}
    ans = 
      laurentPolynomial with properties:
    
        Coefficients: 1
            MaxOrder: 0
    
    

    入力引数

    すべて折りたたむ

    ローラン行列。laurentMatrix オブジェクトとして指定します。

    出力引数

    すべて折りたたむ

    ローラン行列の逆行列。laurentMatrix オブジェクトとして返されます。

    拡張機能

    C/C++ コード生成
    MATLAB® Coder™ を使用して C および C++ コードを生成します。

    バージョン履歴

    R2021b で導入

    参考

    関数

    オブジェクト