• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            eryar

            PipeCAD - Plant Piping Design Software.
            RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
            posts - 603, comments - 590, trackbacks - 0, articles - 0

            OpenCascade Eigenvalues and Eigenvectors of Square Matrix

            eryar@163.com

            Abstract. OpenCascade use the Jacobi method to find the eigenvalues and the eigenvectors of a real symmetric square matrix. Use class math_Jacobi to computes all eigenvalues and eigenvectors by using Jacobi method. The exception NotSquare is raised if the matrix is not square. No verification that the matrix is really symmetric is done.

            Key words. Eigenvalues, Eigenvectors, OpenCascade, Matrix, Jacobi method,

            1. Introduction

            工程技術中的一些問題,如振動問題和穩(wěn)定性問題,常可歸結為求一個方陣的特征值和特征向量的問題。數(shù)學中諸如方陣的對角化及解常微分方程等問題,也都有要用到特征值的理論。

            定義:設A是n階矩陣,如果數(shù)λ和n維非零列向量x使關系式 Ax = λx成立,那么這樣的數(shù)λ稱為方陣A的特征值,非零向量x稱為A對應于特征值λ的特征向量。

            推論:若n階矩陣A與對角陣

            wps_clip_image-30710

            相似,則λ1,λ2,...,λn即是A的n個特征值。

            定理:n階矩陣A與對角陣相似(即A能對角化)的充分必要條件是A有n個線性無關的特征向量。

            推論:如果n階矩陣A的n個特征值互不相等,則A與對角陣相似。

            當A的特征方程有重根時,就不一定有n個線性無關的的特征向量,從而不一定能對角化。一個n階矩陣具備什么條件才能對角化呢?這是一個較復雜的問題。

            定理:設A為n階對稱陣,則有正交陣P,使

            wps_clip_image-2186

            其中∧是以A的n個特征值為對角元的對角陣。

            OpenCascacde中使用了Jacobi方法來計算對稱方陣的特征值和特征向量。本文對math_Jacobi的使用進行詳細說明。

            2. Code Example

            結合同濟第四版《線性代數(shù)》中的例子,來驗證Jacobi方法計算的結果。示例程序如下所示:

            /*
            *    Copyright (c) 2014 eryar All Rights Reserved.
            *
            *        File    : Main.cpp
            *        Author  : eryar@163.com
            *        Date    : 2014-06-22 21:46
            *        Version : 1.0v
            *
            *    Description : Demonstrate how to find the eigenvalues and
            *                  eigenvectors for a symmetric square Matrix.
            *                  題目來自《線性代數(shù)》同濟 第四版
            *                  
            */

            #define WNT

            #include 
            <math_Jacobi.hxx>

            #pragma comment(lib, 
            "TKernel.lib")
            #pragma comment(lib, 
            "TKMath.lib")

            /**
            * OpenCascade use Jacobi method to find the eigenvalues and 
            * the eigenvectors of a real symmetric square matrix.
            */
            void EvalEigenvalue(const math_Matrix &A)
            {
                math_Jacobi J(A);

                std::cout 
            << A << std::endl;

                
            if (J.IsDone())
                {
                    std::cout 
            << "Jacobi: \n" << J << std::endl;
                    
            //std::cout << "Eigenvalues: \n" << J.Values() << std::endl;
                    
            //std::cout << "Eigenvectors: \n" << J.Vectors() << std::endl;

                    
            for (Standard_Integer i = A.LowerRow(); i <= A.UpperRow(); ++i)
                    {
                        math_Vector V(
            1, A.RowNumber());
                        
                        J.Vector(i, V);

                        std::cout 
            << "Eigenvalue: " << J.Value(i) << std::endl;
                        std::cout 
            << "Eigenvector: " << V << std::endl;
                    }
                }
            }

            void TestJacobi(void)
            {
                
            // 1. P120 Example 5:
                math_Matrix A1(12120.0);

                A1(
            11= 3.0;  A1(12= -1.0;
                A1(
            21= -1.0; A1(22= 3.0;

                EvalEigenvalue(A1);

                
            // 2. P120 Example 6:
                math_Matrix A2(13130.0);

                A2(
            11= -1.0; A2(12= 1.0; A2(13= 0.0;
                A2(
            21= -4.0; A2(22= 3.0; A2(23= 0.0;
                A2(
            31= 1.0;  A2(32= 0.0; A2(33= 2.0;

                EvalEigenvalue(A2);

                
            // 3. P120 Example 7:
                math_Matrix A3(13130.0);

                A3(
            11= -2.0; A3(12= 1.0; A3(13= 1.0;
                A3(
            21= 0.0;  A3(22= 2.0; A3(23= 0.0;
                A3(
            31= -4.0; A3(32= 1.0; A3(33= 3.0;

                EvalEigenvalue(A3);

                
            // 4. P127 Example 12:
                math_Matrix A4(13130.0);

                A4(
            11= 0.0;  A4(12= -1.0; A4(13= 1.0;
                A4(
            21= -1.0; A4(22= 0.0;  A4(23= 1.0;
                A4(
            31= 1.0;  A4(32= 1.0;  A4(33= 0.0;

                EvalEigenvalue(A4);

                
            // 5. P138 Execise 5(3);
                math_Matrix A5(13130.0);

                A5(
            11= 1.0; A5(12= 2.0; A5(13= 3.0;
                A5(
            21= 2.0; A5(22= 1.0; A5(23= 3.0;
                A5(
            31= 3.0; A5(32= 3.0; A5(33= 6.0;

                EvalEigenvalue(A5);
            }

            int main(int argc, char* argv[])
            {
                
            // The Jacobi method to find the eigenvalues and
                
            // eigenvectors of a real symmetric square matrx.
                
            // The exception NotSquare is raised if the matrix is not square.
                
            // No verification that the matrix is really symmetric is done.
                TestJacobi();

                
            return 0;
            }

            計算結果部分如下圖所示:

            wps_clip_image-8177

            Figure 2.1 Jacobi method Result


            3. Conclusion

            矩陣的特征值和特征向量的理論能用來求解微分方程組的問題。振動分析、現(xiàn)代控制理論中的數(shù)學模型都可歸結為對微分方程組的求解。因此,對特征值和特征向量的數(shù)值計算有重要的意義。

            OpenCascade中提供了使用Jacobi方法來計算特征值和特征向量的類math_Jacobi。從計算結果可以看出,math_Jacobi只對對稱方陣的計算結果準確,若不是對稱陣,則計算結果是不準確的。

            會使用OpenCascade中現(xiàn)成的算法是一回事,能實現(xiàn)這些算法又是另外一回事。對計算特征值和特征向量的數(shù)值方法感興趣的讀者,可以參考《計算方法》或《數(shù)值分析》等相關書籍。

            4. References

            1. 同濟大學應用數(shù)學系. 線性代數(shù). 高等教育出版社. 2003

            2. 易大義, 沈云寶, 李有法. 計算方法. 浙江大學出版社. 2002

            3. 楊明, 李先忠. 矩陣論. 華中科技大學出版社. 2005

            Feedback

            # re: OpenCascade Eigenvalues and Eigenvectors of Square Matrix  回復  更多評論   

            2014-06-22 20:43 by 旗袍女裝
            。對計算特征值和特征向量的數(shù)值方法感興趣的讀者,可以參考《計算方法》或《數(shù)值分析》等相關書籍。旗袍女裝 www.ssnz88.net

            久久免费香蕉视频| 国内精品久久久久影院免费| 久久成人18免费网站| 热RE99久久精品国产66热| 久久国产AVJUST麻豆| 色播久久人人爽人人爽人人片AV| 亚洲AV日韩精品久久久久久 | 色综合合久久天天给综看| 日韩中文久久| 亚洲伊人久久大香线蕉综合图片| 久久天天躁狠狠躁夜夜网站 | 国产成人精品久久综合| 亚洲日本va午夜中文字幕久久| 国产成人精品综合久久久| 亚洲国产精品久久66| 99久久国产宗和精品1上映| 国产午夜福利精品久久| 久久精品国产亚洲av水果派 | av色综合久久天堂av色综合在| 久久婷婷久久一区二区三区| 国产成人精品综合久久久| 久久久WWW成人免费精品| 国产精品一久久香蕉国产线看| 一级做a爰片久久毛片免费陪| 精品综合久久久久久97超人| 无码久久精品国产亚洲Av影片 | 久久夜色精品国产噜噜噜亚洲AV| 日日狠狠久久偷偷色综合0| 国产亚洲欧美成人久久片| 久久这里只有精品18| 亚洲AV乱码久久精品蜜桃| 久久久久人妻一区二区三区| 伊人情人综合成人久久网小说| 人妻无码久久精品| 久久国产影院| 老司机午夜网站国内精品久久久久久久久 | 国产综合成人久久大片91| 国产精品欧美久久久天天影视| 久久天堂AV综合合色蜜桃网| 国产成人精品综合久久久| 精品综合久久久久久98|