版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、星期四, 2008-4- 24, 12:40:54,Slide 1 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Chapter 4Linear Algebra Problems,Solving Applied Mathematical Problems with MATLAB,CRC/Taylor & Francis Press Chinese version by Tsinghua University Press,PPT by
2、 Wenbin Dong and Jun Peng, Northeastern University, PRC Proofread by Dingyu Xue & YangQuan Chen,星期四, 2008-4- 24, 12:40:54,Slide 2 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Chapter 4 Linear Algebra Problems,Inputting Special Matrices Fund
3、amental Matrix Operations Fundamental Matrix Transformations Solving Matrix Equations Nonlinear Functions and Matrix Function Evaluations Chapter summary,星期四, 2008-4- 24, 12:40:54,Slide 3 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.1 Inp
4、utting Special Matrices,Numerical matrix input Defining symbolic matrices,星期四, 2008-4- 24, 12:40:54,Slide 4 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.1.1 Numerical matrix input,Matrices of zeros, ones and identity matrices Matrices wit
5、h random elements Diagonal matrices Hankel matrices Hilbert matrices and their inverses Vandermonde matrices Companion matrices,星期四, 2008-4- 24, 12:40:54,Slide 5 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Matrices of zeros, ones and ident
6、ity matrices,The syntax of matrices of zero matrix, identity matrix and matrix of ones square matrix,星期四, 2008-4- 24, 12:40:54,Slide 6 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,rectangular matrix with the same size of B Multi-dimensional
7、 arrays and other data forms are also supported,星期四, 2008-4- 24, 12:40:54,Slide 7 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.1,Generate a zero matrix A, and generate a expanded unit matrix B with the same dimension as matrix A.
8、MATLAB solutions: Note: zeros() and ones() can also be used to define multi-dimensional arrays.,星期四, 2008-4- 24, 12:40:54,Slide 8 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Matrices with random elements,Each element of matrix satisfies a
9、uniform distribution in . The syntax: An uniformly distributed random matrix An random,星期四, 2008-4- 24, 12:40:54,Slide 9 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Function rand() can also be used to define multi-dimensional random arrays
10、 Declare a random matrix of size The uniform distribution matrix over a,b interval can be generated with,星期四, 2008-4- 24, 12:40:54,Slide 10 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Define a standard normal distributed N(0,1) random matr
11、ices Generating N(m,s2) random numbers,星期四, 2008-4- 24, 12:40:54,Slide 11 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Diagonal matrices,Mathematical description to a diagonal matrix where all the non-diagonal elements are 0,星期四, 2008-4- 24
12、, 12:40:54,Slide 12 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Define a matrix from given vector Extract diagonal vector from a given matrix Define the kth diagonal Note: k can be assigned to negative integers,星期四, 2008-4- 24, 12:40:54,Sl
13、ide 13 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.2,Different calling formats of diag() function Generate a diagonal matrix: Diagonal elements extraction: Input the corresponding diagonal line V,星期四, 2008-4- 24, 12:40:54,Slide 1
14、4 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Generate the tri-diagonal matrix: The matrix can be constructed with,星期四, 2008-4- 24, 12:40:54,Slide 15 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB,
15、CRC Press, 2008,Construct a block diagonal matrix: The syntax,星期四, 2008-4- 24, 12:40:54,Slide 16 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Hankel matrices,The general form of the Hankel matrix Given two vectors and,星期四, 2008-4- 24, 12:40
16、:54,Slide 17 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,where vector is the first column, vector is the last row. Construct an upper-triangular Hankel matrix,星期四, 2008-4- 24, 12:40:54,Slide 18 (of 178) Dingy Xue and YangQuan Chen, Solving
17、 Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.3,Establish the following Hankel matrices MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 19 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Hilbert matrices and their inv
18、erses,The general form of the Hilbert matrix where,星期四, 2008-4- 24, 12:40:54,Slide 20 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,The syntax for generating a Hilbert matrix The syntax for generating inverse Hilbert matrix Note: Hilbert mat
19、rices are very close to singular matrices, symbolic computation is recommended!,星期四, 2008-4- 24, 12:40:54,Slide 21 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Vandermonde matrices,Mathematical description to the Vandermonde matrix where Ge
20、nerating a Vandermonde matrix,星期四, 2008-4- 24, 12:40:54,Slide 22 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.4,Establish a Vandermonde matrix MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 23 (of 178) Dingy Xue and YangQuan Ch
21、en, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Companion matrices,The companion matrix of a monic polynomial Math form,星期四, 2008-4- 24, 12:40:54,Slide 24 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,The syntax for ge
22、nerating a companion matrix where is a polynomial coefficient vector,星期四, 2008-4- 24, 12:40:54,Slide 25 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.5,Consider a polynomial Find its companion matrix MATLAB solutions:,星期四, 2008-4-
23、24, 12:40:54,Slide 26 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.1.2 Defining symbolic matrices,Convert a numerical matrix A into a symbolic one, for analytical solutions The syntax for converting to a symbolic matrix Overload matrix en
24、tering matrix, sym compan, hankel, vander,星期四, 2008-4- 24, 12:40:54,Slide 27 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Construct a symbolic companion matrix:,星期四, 2008-4- 24, 12:40:54,Slide 28 (of 178) Dingy Xue and YangQuan Chen, Solvin
25、g Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.6,Given establish its companion matrix MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 29 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Construct a symbolic Hankel matr
26、ix:,星期四, 2008-4- 24, 12:40:54,Slide 30 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Construct a symbolic Vandermonde matrix: All the three functions should be saved in sym Avoid conflict with existing ones,星期四, 2008-4- 24, 12:40:54,Slide 31
27、 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.2 Fundamental Matrix Operations,Basic concepts and properties of matrices Matrix inversion and generalized matrix inversion Matrix eigenvalue problems,星期四, 2008-4- 24, 12:40:54,Slide 32 (of 17
28、8) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.2.1 Basic concepts and properties of matrices,Determinant Trace Rank Norms Characteristic polynomials Evaluation of polynomial matrices Conversion between symbolic and numerical polynomials,星期四, 2008
29、-4- 24, 12:40:54,Slide 33 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Determinant,The determinant of matrix is defined as The syntax Note: this function applies both to symbolic and numerical matrices .,星期四, 2008-4- 24, 12:40:54,Slide 34 (
30、of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.7,Compute the determinant of a given matrix MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 35 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB,
31、CRC Press, 2008,Example 4.8,Calculate analytically the determinant of a Hilbert matrix MATLAB solutions: Result:,星期四, 2008-4- 24, 12:40:54,Slide 36 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Trace,The trace of a square matrix is defined a
32、s The syntax,星期四, 2008-4- 24, 12:40:54,Slide 37 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Rank,The rank of matrix A is defined as is the column rank and is the row rank. The syntax Symbolic or numerical Numerical rank with error toleranc
33、e of,星期四, 2008-4- 24, 12:40:54,Slide 38 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.9,Find the rank of MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 39 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Proble
34、ms with MATLAB, CRC Press, 2008,Example 4.10,Determine the rank of a Hilbert matrix with numerical or analytical methods . MATLAB solutions: Numerical method: Analytical method: Numerical method may give misleading results,星期四, 2008-4- 24, 12:40:54,Slide 40 (of 178) Dingy Xue and YangQuan Chen, Solv
35、ing Applied Mathematical Problems with MATLAB, CRC Press, 2008,Scalar norms,For a scalar function to be a vector norm of vector , the following 3 conditions must be satisfied: and if and only if a is any given scalar For any vectors and , the following holds,星期四, 2008-4- 24, 12:40:54,Slide 41 (of 17
36、8) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,This p-norm satisfies all the three conditions: and is the notation of a vector norm.,星期四, 2008-4- 24, 12:40:54,Slide 42 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with
37、 MATLAB, CRC Press, 2008,For any non-zero vector , the norm is Commonly used matrix norms:,Matrix norms,星期四, 2008-4- 24, 12:40:54,Slide 43 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,where is the eigenvalues of the matrix , while is the ma
38、ximum eigenvalue of The syntax Default for options could be 1,2, inf, fro Note: norm() applies only to numerical matrices,星期四, 2008-4- 24, 12:40:54,Slide 44 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Compute various norms of MATLAB soluti
39、ons:,星期四, 2008-4- 24, 12:40:54,Slide 45 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Characteristic polynomials,The characteristic polynomial of a matrix is The polynomial is referred to as the characteristic polynomial of matrix . The synt
40、ax,星期四, 2008-4- 24, 12:40:54,Slide 46 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.11,Find the characteristic polynomial of matrix Direct computation:,星期四, 2008-4- 24, 12:40:54,Slide 47 (of 178) Dingy Xue and YangQuan Chen, Solvin
41、g Applied Mathematical Problems with MATLAB, CRC Press, 2008,Using Symbolic Math Toolbox: Leverrier-Faddeev recursive algorithm: where Loop structure can be used,星期四, 2008-4- 24, 12:40:54,Slide 48 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 200
42、8,A new MATLAB function Main body of the function,星期四, 2008-4- 24, 12:40:54,Slide 49 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,code continued from the last slide,星期四, 2008-4- 24, 12:40:54,Slide 50 (of 178) Dingy Xue and YangQuan Chen, So
43、lving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.12,Given vector , establish a Hankel matrix and find its characteristic polynomial. MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 51 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB,
44、 CRC Press, 2008,If the polynomial can be expressed as Then and Loops can be used,星期四, 2008-4- 24, 12:40:54,Slide 52 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Construct an MATLAB function,星期四, 2008-4- 24, 12:40:54,Slide 53 (of 178) Dingy
45、 Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.13,Extract the coefficients of the characteristic polynomial of matrix MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 54 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems
46、 with MATLAB, CRC Press, 2008,Evaluation of polynomial matrices,Mathematical form of polynomial matrices : The syntax: where is the coefficients in descending order of s of the polynomial.,星期四, 2008-4- 24, 12:40:54,Slide 55 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems
47、with MATLAB, CRC Press, 2008,Definition of dot operation: The syntax Get a polynomial in p (Symbolic Math):,星期四, 2008-4- 24, 12:40:54,Slide 56 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Cayley-Hamilton Theorem: If the characteristic polyn
48、omial of a matrix is given by Then, , that is,星期四, 2008-4- 24, 12:40:54,Slide 57 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.14,Verify the Cayley-Hamilton theorem using a Vandermonde matrix as an example. MATLAB solutions (errone
49、ous): Using poly1() function:,星期四, 2008-4- 24, 12:40:54,Slide 58 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Conversion between symbolic and numerical polynomials,Given a vector Convert a numerical polynomial to symbolic expression: Conver
50、t a symbolic expression to a vector:,星期四, 2008-4- 24, 12:40:54,Slide 59 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.15,Using both numerical and symbolic forms to express Convert to the symbolic polynomial: Convert to the numerica
51、l form of a polynomial:,星期四, 2008-4- 24, 12:40:54,Slide 60 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,4.2.2 Matrix inversion and generalized inverse of a matrix,Inverse matrix Generalized matrix inverse,星期四, 2008-4- 24, 12:40:54,Slide 61
52、(of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Inverse matrix,Mathematical description to inverse matrix where is an non-singular square matrix, then, The syntax,星期四, 2008-4- 24, 12:40:54,Slide 62 (of 178) Dingy Xue and YangQuan Chen, Solving
53、 Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.16,Inverse for the given Hilbert matrix Hilbert matrix Use invhilb() function to directly get the inverse matrix:,星期四, 2008-4- 24, 12:40:54,Slide 63 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with
54、MATLAB, CRC Press, 2008,Hilbert matrix: Hilbert matrix:,星期四, 2008-4- 24, 12:40:54,Slide 64 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,For symbolic matrix: Hilbert inverse matrix: Hilbert inverse matrix:,星期四, 2008-4- 24, 12:40:54,Slide 65
55、(of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Example 4.17,Inverse matrix for singular matrix MATLAB solutions: Using Symbolic Math Toolbox:,星期四, 2008-4- 24, 12:40:54,Slide 66 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematica
56、l Problems with MATLAB, CRC Press, 2008,Example 4.18,Derive the inverse matrix of the Hankel matrix MATLAB solutions:,星期四, 2008-4- 24, 12:40:54,Slide 67 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Generalized matrix inverse,For singular an
57、d/or rectangular matrix If , then is called the generalized inverse of , denoted by Not unique Define the norm minimization index as,星期四, 2008-4- 24, 12:40:54,Slide 68 (of 178) Dingy Xue and YangQuan Chen, Solving Applied Mathematical Problems with MATLAB, CRC Press, 2008,Conditions for a matrix to be a Moore-Penrose generalized inverse of matrix : (i) (ii) (iii) and are Hermitian symmetrical Denote Unique and meaningful,Moore-Penrose generaliz
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2021考研312心理学真题答案估分专用版
- 2026年助学贷款线上测试题目及答案
- 2021年东台护士考编面试最后三套卷题库及参考答案
- 2026年单招畜牧类专业面试通关秘籍配套题库及标准答案
- 2026考研英语二作文预测25篇含高分句型
- 2025年微机中考电脑实操模拟题附满分答案
- 2021二年级科学天气模块易错点专项排查卷带答案解析
- 2023年广西事业单位考试B类模拟题及答案 手机电脑都能随时刷
- 2020事业单位联考笔试真题综应高分答案模板配配套真题
- 江苏省盐城市东台市第一教育联盟2025-2026学年七年级上学期1月期末生物试卷(含解析)
- 提高医疗服务质量数字健康档案管理的作用与实践
- 林下经济种植协议书
- 车位协议书模板
- 《猪病毒性疾病》课件
- 2025年国有企业开展廉洁风险防控管理工作实施方案范文范文大全
- 制作间管理制度
- 瓦克夏燃气发动机基础知识
- 2025山东建筑安全员B证考试题库及答案
- 附件6工贸高风险企业高危领域较大以上安全风险管控清单
- 系统维护与管理说明手册
- 酒店自助早餐接待流程
评论
0/150
提交评论