pascal
Pascal matrix
Syntax
p = pascal(n) p = pascal(n, k)
Arguments
- n
non-negative scalar integer.
- k
a positive integer: 0, 1 or 2. Default value is 0.
- p
n x n matrix.
Description
p = pascal(n) returns the Pascal matrix of size n x n. The Pascal matrix is the symmetric matrix, positive definite and has the Cholesky factorization.
p = pascal(n, 0) is equivalent to p = pascal(n)
.
p1 = pascal(n, 1) returns the lower triangular Cholesky factor of the Pascal matrix, and p1 * p1' = p
where p is the result of pascal(n)
. The result is its own inverse and is equal to the square root of the identity matrix,
p1 ^2 = eye(n,n)
.
p2 = pascal(n, 2) permutes and transposes pascal(n, 1)
. p2^3
is equal to the cube root of the
identity matrix.
Examples
p = pascal(4)
p = pascal(4) p1 = pascal(4, 1) p1 * p1' == p p1 ^ 2
p = pascal(4, 2) p ^ 3
See also
- vander — Vandermonde matrix
History
バージョン | 記述 |
2025.1.0 | Introduction in Scilab. |
Report an issue | ||
<< ones | elementarymatrices | perms >> |