生成Pascal矩阵
pascal
Pascal matrix
Syntax
A = pascal(n)
A = pascal(n,1)
A = pascal(n,2)
Description
A = pascal(n) returns the Pascal matrix of order n: a symmetric positive definite matrix with integer entries taken from Pascal's triangle. The inverse of A has integer entries.
A = pascal(n,1) returns the lower triangular Cholesky factor (up to the signs of the columns) of the Pascal matrix. It is involutary, that is, it is its own inverse.
A = pascal(n,2) returns a transposed and permuted version of pascal(n,1). A is a cube root of the identity matrix.
Examples
pascal(4) returns
1 1 1 1
1 2 3 4
1 3 6 10
1 4 10 20
A = pascal(3,2) produces
A =
1 1 1
-2 -1 0
1 0 0
See Also
chol
Provide feedback about this page
parseSoapResponse parseSoapResponse patch patch
© 1984-2009 The MathWorks, Inc. • Terms of Use • Patents • Trademarks • Acknowledgments
pascal(n)是矩阵实验室(Matrix Laboratory)MATLAB中的命令,利用pascal()命令可以在矩阵实验室中方便的得到任意阶帕斯卡矩阵。设A为帕斯卡矩阵,则在MATLAB命令窗口中输入A=pascal(n),n为正整数,可得到阶数为n的帕斯卡矩阵。
帕斯卡矩阵:由杨辉三角形表组成的矩阵称为帕斯卡(Pascal)矩阵。
杨辉三角形表是二次项 (x+y)^n 展开后的系数随自然数 n 的增大组成的一个三角形表。
百度一下