厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 2 - Solving Linear Systems of Equations

MATLAB Exercise 2 School of mathematical ces Xiamen University httplgdipke.xmuedu MATLAB Exercise 2 -Solving Linear Systems of Equations 1. Generate random5×5 matrices with integer entries(元素) by setting A-round(10*rand(5) and B=round(20*rand(5))-10 Use MATLAB to compute each of the following pairs of numbers In each case check whether he first is equal to the second a)AA b)JA+B AF+[B C)AB AlBI d)A'B'||A'‖B’l e)|+11f|AB1141 inv(X) returns the inverse of the square matrix X elp inv(A)returns the inverse of the square matrixa det(A)returns the determinant of the square matrix A A returns the conjugate transpose of A 2. Set A-round(10 *rand(6)). In each of the following, use MATLAb to compute a second matrix as indicated. State how the second matrix is related to A and compute the determinants of both matrices. How are the determinants related? a)B=A;B(2,)=A(1,),B(1,}=A(2,:) b)C=A;C(3,)4*A(3,:) c)D=A,D(5,)=A(5,)+2*A(4,) 3. Use Cramer's rule(det), backslash () operation, inv function, rref function respectively to solve the following systems. And check whether the results are the exact solutions of the corresponding equations. If not, try to show the reason x1+2x2=4 5x1+x2=4 4x,+2x-x,=2 x+3x2+x3=1 c){3x-x2+2x3=10 5 llx1+3x2=8 2x,+2 lp In command window input help rref to see the usage of this function 4. Let A=2 3 4, compute the third of column of A" by using Cramer's rule to solve Ax=e3. The result should be displayed in rational format 5. Let a be the matrix in ex4. Compute the adj A(A的伴随矩阵) by using the inv and det function 6. Compute the general solution of the following linear systems by using backslash (1), null and rref function x1+x2-5x3 x1+x2-5x3 a)14x+5x2+x=8 b){4x+5x+x1=8 2x+4x,+4x2=8 Ex2-1
MATLAB Exercise 2 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu. Ex21 MATLAB Exercise 2 Solving Linear Systems of Equations 1. Generate random 5×5 matrices with integer entries(元素) by setting A=round(10*rand(5)) and B=round(20*rand(5))10 Use MATLAB to compute each of the following pairs of numbers. In each case check whether the first is equal to the second. a) |A| |A’| b) |A+B| |A|+|B| c) |AB| |A||B| d) |A’B’| |A’||B’| e) 1 | A | - 1 | A| f) 1 | AB | - | | | | A B inv(X) returns the inverse of the square matrix X Help inv(A) returns the inverse of the square matrix A det(A) returns the determinant of the square matrix A A’ returns the conjugate transpose of A 2. Set A=round(10*rand(6)). In each of the following, use MATLAB to compute a second matrix as indicated. State how the second matrix is related to A and compute the determinants of both matrices. How are the determinants related? a) B=A; B(2, :) = A(1, :); B(1, :)=A(2, :) b) C=A; C(3, :)=4*A(3, :) c) D=A; D(5, :)=A(5, :)+2*A(4, :) 3. Use Cramer’s rule (det), backslash (\) operation, inv function, rref function respectively to solve the following systems. And check whether the results are the exact solutions of the corresponding equations. If not, try to show the reason. a) 1 2 1 2 2 4 2 2 2 x x x x Ï + = Ì - = Ó b) 1 2 1 2 2 3 1 5 4 x x x x Ï + = - Ì + = Ó c) 1 2 3 1 2 3 1 2 4 2 2 3 2 10 11 3 8 x x x x x x x x Ï + - = Ô Ì - + = Ô + = Ó d) 1 2 3 1 2 3 1 2 3 3 1 2 5 2 2 8 x x x x x x x x x Ï + + = Ô Ì + + = Ô - + - = - Ó Help In command window input help rref to see the usage of this function 4. Let 1 2 3 2 3 4 5 4 6 A = , compute the third of column of 1 A - by using Cramer’s rule to solve Ax=e3. The result should be displayed in rational format. 5. Let A be the matrix in Ex4. Compute the adj A (A 的伴随矩阵) by using the inv and det function. 6. Compute the general solution of the following linear systems by using backslash(\), null and rref function. a) 1 2 3 1 2 3 1 2 3 2 3 0 4 5 8 2 4 2 x x x x x x x x x Ï + - = Ô Ì + + = Ô - - + = Ó b) 1 2 3 1 2 3 1 2 3 2 3 0 4 5 8 2 4 4 8 x x x x x x x x x Ï + - = Ô Ì + + = Ô + + = Ó

MATLAB Exercise 2 School of Mathematical Sciences Xiamen University httplgdipke.xmuedu 2x1+x,-3x3=0 7. Compute the general solutions of 4x,+5x2+x,=0 by using rref function 2x1-2x2-10x3=0 8.+ Use rand function to generate several4×3,3×1,3×4,4× I matrices, compare the results of the corresponding linear systems computed by \ inv and pinv Help pinv(A)returns the Moore-Penrose pseudoinverse of A, where A need not be a square matrIx 9. *Use rand to generate a linear system Ax=b. Try the display the result if r(a br(A); else display There is no solution. " (if) 10. Set A=11; 2 4 2: 21 1: B=3 12; 122: 314; C=A+i*B Use MATLAB to compute each of matrices. In each case check whether the first is equal to the If they are equal then display The first matrix is equal to the second one. Otherwise display The first matrix is not equal to the second one 2)A A 3)inv(A)pinv(A) 4)inv(B)pinv(B) Held A'returns the conjugate transpose of A A. returns the transpose of A nj (A)returns the conjugate of A 11. Use help to study functions: trace, rank, conj, rref, rrefmovie, format Ex2-2
MATLAB Exercise 2 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu. Ex22 7. Compute the general solutions of 1 2 3 1 2 3 1 2 3 2 3 0 4 5 0 2 2 10 0 x x x x x x x x x Ï + - = Ô Ì + + = Ô - - = Ó by using rref function. 8. *Use rand function to generate several 4×3, 3×1; 3×4, 4×1 matrices, compare the results of the corresponding linear systems computed by \, inv and pinv. Help pinv(A) returns the MoorePenrose pseudoinverse of A, where A need not be a square matrix. 9. *Use rand to generate a linear system Ax=b. Try the display the result if r(A b)=r(A); else display “There is no solution.” (if) 10. Set A=[1 2 1; 2 4 2; 2 1 1]; B=[3 1 2; 1 2 2; 3 1 4]; C=A+i*B. Use MATLAB to compute each of the following pairs of matrices. In each case check whether the first is equal to the second. If they are equal then display ‘The first matrix is equal to the second one.’ Otherwise display ‘The first matrix is not equal to the second one.’ 1) C’ C.’ 2) A’ A.’ 3) inv(A) pinv(A) 4) inv(B) pinv(B) Help A’ returns the conjugate transpose of A A.’ returns the transpose of A conj(A) returns the conjugate of A 11. Use help to study functions: trace, rank, conj, rref, rrefmovie, format
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 1 - Matrices & Arrays.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 9 - Graphics-Surface.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 8 - Graphics-Curve.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 7 - Calculus.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 6 - Polynomial.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 5 - Symbol Computation.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 4 - Eigenvalue.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 3 - Linear space.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 2 - Solving Linear Systems of Equations.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Lecture 1 - Matrices & Arrays.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)线性空间应用——炼油厂模型(矩阵与线性方程组).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)矩阵应用——投入产出方法选介(矩阵方程).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)行列式应用——行列式在空间解析几何中的应用.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)行列式应用——欧拉四面体问题.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)行列式应用——三角形面积的行列式公式.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(考研竞赛题选)Harvard-MIT Mathematics Tournament 2003-2008.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(大学数学竞赛题选)第二届全国大学生数学竞赛决赛试卷(非数学类2011).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(大学数学竞赛题选)第二届全国大学生数学竞赛决赛试卷(数学类2011).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(大学数学竞赛题选)第三届全国大学生数学竞赛预赛试题参考答案及评分标准(非数学类 2011).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(大学数学竞赛题选)第三届全国大学生数学竞赛预赛试题(非数学类 2011).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 3 - Linear Space(10).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 4 - Eigenvalue.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 5 - Symbol Computation.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 6 - Polynomial.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 7 - Calculus.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 8 - Graphics-Curve.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)MATLAB Ex 9 - Graphics-Surface.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 1 - Matrices & Arrays.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 2 - Solving Linear Systems of Equations.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 3 - Linear Space(10).pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 4 - Eigenvalue.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 5 - Symbol Computation.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 6 - Polynomial.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 7 - Calculus.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 8 - Graphics-Curve.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(应用与实验)Key to MATLAB Ex 9 - Graphics-Surface.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(方法选讲,打印版)第一章 一元多项式.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(方法选讲,打印版)第四章 线性空间.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(方法选讲,打印版)第六章 线性方程组.pdf
- 厦门大学数学科学学院:《高等代数》课程教学资源(方法选讲,打印版)第九章 特征值和特征向量.pdf