标题: MATLAB的Pascal matrix 简单介绍 [打印本页] 作者: mytomorrow 时间: 2020-1-10 10:01 标题: MATLAB的Pascal matrix 简单介绍 本帖最后由 mytomorrow 于 2020-1-10 10:12 编辑 ; E! v/ W( Q: t6 W ; H* e, Q7 r! b8 Z% v) \: ~. z2 L: |- {7 z: c; @4 n8 t) Q( @8 X pascal 2 g2 m+ W+ z* V7 W) t8 QPascal matrix$ ^. B9 e+ u! o2 G0 n# A1 u% Y
; G8 W+ t' T2 |4 S. Q
9 A' E2 ^- J5 D& I Syntax 2 ~5 T- i2 `/ |& y. B( f7 t* O8 G9 E3 t6 f# i
P = pascal(n) * Y( e, @1 Z! U1 b9 i- `- j7 }+ o6 I& J5 T% f/ N. i+ t
P = pascal(n,1)# J8 q3 L, D# b( H: u% V% b F
/ i* _) C1 ]& b, p* j) A/ U. [
P = pascal(n,2) . M6 O; i$ x' v8 N6 |* C 8 W6 p- A2 w3 n0 ^; l) A( n% sP = pascal(___,classname) * g- G/ T6 W& G! ~7 T" D. Z 1 Y' r8 z4 L! u0 a1 o; M% M * W) F: _, A {' g/ H7 p9 M( eDescription, T3 {$ ?' d* g$ I" d' j
" v( _. G: q: C( O8 g& FP = pascal(n) returns a Pascal’s Matrix of order n. P is a symmetric positive definite matrix with integer entries taken from Pascal's triangle. The inverse of P has integer entries./ `( Q2 k! t6 S4 ?1 t5 K
N8 e S k% H; A3 v
P = pascal(n)返回阶数为n的Pascal矩阵。 P是对称正定矩阵,其整数条目取自Pascal的三角形。 P的倒数具有整数条目。 . s6 B$ \3 J) f Q + F1 K; Y, w' o t( D3 hP = pascal(n,1) returns the lower triangular Cholesky factor (up to the signs of the columns) of the Pascal matrix. P is involutary, that is, it is its own inverse. 2 s1 V3 s6 D, i/ A4 E* ]+ R: ~* R5 x" {2 w, x
P = pascal(n,1)返回Pascal矩阵的下三角Cholesky因子(直到列的符号)。 P是非自愿的,也就是说,它是它自己的逆。 ; U2 V( g& c9 ?8 c7 k2 } m$ J% r2 S+ f* ~* [
P = pascal(n,2) returns a transposed and permuted version of pascal(n,1). In this case, P is a cube root of the identity matrix.: p0 H6 n0 g& E, U8 ?) U& X, {
( j2 O9 h3 D1 K" ~$ xP = pascal(n,2)返回pascal(n,1)的转置和置换版本。 在这种情况下,P是单位矩阵的立方根。8 Y7 y2 C( r, N; q, [
$ T3 N7 g8 b( _! M6 d5 B3 J3 {P = pascal(___,classname) returns a matrix of class classname using any of the input argument combinations in previous syntaxes. classname can be 'single' or 'double'.; O" P. @; W2 T! J) [
+ B) }( V/ h9 R) ?& _
P = pascal(___,classname)使用先前语法中的任何输入参数组合返回类classname的矩阵。 classname可以是'single'或'double'。4 m/ `7 L. t/ Q, }/ G8 B- `
/ o6 A8 H" i' l3 C3 C) T3 p( u8 `8 X4 e Matrix from Pascal's Triangle 9 F( q. e1 X0 o) i# U4 B' }* j) ^1 A5 ?
9 Z6 y4 v) ?8 A, p, q+ k- ?Compute the fourth-order Pascal matrix.& _3 S& X! P; D
( }) Y" Q) x0 s6 `' l6 k, KA = pascal(4)$ G8 g1 m- v# T6 \4 \% r
7 E! B R& I+ y+ P7 c" L, [) [A = 4×4 ! h' l2 j- |6 R4 J2 f, ^ 4 _1 v9 o8 C$ M+ E- T6 z* O. V 1 1 1 18 y* q* b/ T; u4 M/ z
1 2 3 42 v" g) ?% W6 L
1 3 6 10 . z" `) c2 o+ n4 r) H+ g( x8 Q 1 4 10 20 + T6 e# b$ `$ {0 E: w3 M 3 W# m0 j0 y6 a- J% qCompute the lower triangular Cholesky factor of the third-order Pascal matrix, and verify it is involutory.1 M6 ~4 l( l+ D% C