找回密码
 注册
关于网站域名变更的通知
查看: 598|回复: 1
打印 上一主题 下一主题

MATLAB的Pascal matrix 简单介绍

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-1-10 10:01 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
本帖最后由 mytomorrow 于 2020-1-10 10:12 编辑 4 X) N0 q* {# }/ `$ P

9 p' a' f1 [7 _
6 M& |. |+ M' z+ xpascal
9 Q/ k6 ~8 A+ [) XPascal matrix8 b) d# H" V0 r! _% x; u# @
% ]# X' c' T9 k7 u: y1 d
: U- s( h% r) u: C& ~- W
Syntax2 N! T5 `, o9 \( k

/ ?3 m0 R% \# u' fP = pascal(n)% u! q1 ?4 b6 w5 u# l: J1 G
/ \9 q2 f5 T" [
P = pascal(n,1)
: z& B5 w0 C4 z
# M8 W2 W/ P9 |9 B: `' F0 w* \P = pascal(n,2)1 }3 l7 M7 w! }* K1 p
0 T8 I& i) N% H
P = pascal(___,classname)
, f) r3 T/ x9 F( a8 D0 g' q- x' \( E/ h7 w: j" C( p

! I- V$ [+ H# h5 TDescription3 N8 v. E  Z0 t" J
' v. U, ~/ S" T5 W8 L
P = 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.! O" j8 x7 C  x/ Z) c! N; z/ x* X
- _% L/ ?% D4 {8 C$ j% P, i
P = pascal(n)返回阶数为n的Pascal矩阵。 P是对称正定矩阵,其整数条目取自Pascal的三角形。 P的倒数具有整数条目。  x! r# h# p, G( |) b" c

% d+ b9 z/ L* a( W: ~P = 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.
  s+ Y/ s( M8 u2 s% }. l
4 P; I& Y5 t# ?  O5 k8 W6 gP = pascal(n,1)返回Pascal矩阵的下三角Cholesky因子(直到列的符号)。 P是非自愿的,也就是说,它是它自己的逆。7 q) G0 E. h6 {( N2 O

4 ]/ {: T; D# ?1 t  ^0 Z3 ?7 TP = 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.5 a) ^$ d% D2 d6 {% A6 K
5 H* O+ q, i; j+ k, d% n
P = pascal(n,2)返回pascal(n,1)的转置和置换版本。 在这种情况下,P是单位矩阵的立方根。/ C; S% y: e% s6 }/ o' `7 I7 @9 ^9 n
1 t' b6 c( w5 ~. f. f# u5 g/ u& e
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'.
: p+ z' d% j+ N7 @7 ?2 a; ?3 Y4 C7 Z- P% b4 ~
P = pascal(___,classname)使用先前语法中的任何输入参数组合返回类classname的矩阵。 classname可以是'single'或'double'。
+ V" L! j! v5 M" T9 N1 G* X0 R3 L4 L5 b7 o  |) S$ [

; P' E1 ~  k# H+ ^3 b4 Y$ l1 R4 ^5 ]Matrix from Pascal's Triangle! n" S' |  F9 D; a- ]$ c  m

; v2 N8 ?: N1 L7 Q- h. J/ |* w6 J3 E5 G( Q* _
Compute the fourth-order Pascal matrix.
2 o: P6 t5 z/ r" D& s$ \9 i% \! U% a. A4 t
A = pascal(4)
1 }$ e" A7 K+ V+ [5 l# s0 V: Q- A9 n# @, X9 G6 l' k0 `" K; ]
A = 4×4
# X0 r4 t2 L1 i3 g6 {
- S( [/ V: Z2 _+ e' Q     1     1     1     1
+ |8 w9 U8 _( A* w' Q5 M0 Q     1     2     3     4+ A' v, f( k; M- \- r* r" |# g
     1     3     6    101 C- E' y& m, A! L7 {. c. x, X
     1     4    10    20
7 |+ z2 _8 e2 P0 L7 c8 \- ]) a8 ~
Compute the lower triangular Cholesky factor of the third-order Pascal matrix, and verify it is involutory.
  [+ g1 \( P5 y0 W# L8 l+ D9 a! s
0 s6 I2 Y# [6 h( x- s& QA = pascal(3,1)8 |7 K2 _9 F2 V. x

  H8 w& x" @# z4 V4 W! E
  K5 p, w( X. X2 CA = 3×33 {* ?2 J2 h7 H0 H
1 d  J: J( v6 g
     1     0     0& F) l$ O$ ~( y8 f
     1    -1     0
6 [% F+ v1 X7 I8 H8 F     1    -2     1
& x# @7 _3 O9 l; `9 j" V
! \( ?- H) H7 p( \* qinv(A)$ v' D! V5 z, L

5 R) r  [7 a" Rans = 3×3" g" U0 t( P8 m' {
/ u$ U" K$ W  S6 [
     1     0     0
4 q% h, s* Z  d+ d1 m     1    -1     0
) V$ B$ z( H7 q! t3 m$ c     1    -2     1
/ {6 N  X9 ?" v$ \( |$ Q
( O# x4 m7 }9 P9 A( d帕斯卡的矩阵5 k% B* f9 b9 v9 m6 k1 C
帕斯卡的三角形是由数字行组成的三角形。 第一行具有条目1.每个后续行通过添加前一行的相邻条目而形成,替换为0,其中不存在相邻条目。 pascal函数通过选择与指定矩阵维度相对应的Pascal三角形部分来形成Pascal矩阵,如图所示。 概述的矩阵对应于MATLAB®命令pascal(4)。9 a/ N  s3 o7 s  @6 d

' a! r- z+ ]; Q. T+ _ ; O% X3 ~, g, ]0 V, u* K& ~
3 O1 e6 h  ?8 X1 m, U  A5 B. H
根据上述描述,我们猜测,pascal(3)为:. H/ S0 x, |* ?, ^. i% b' j9 T

  @+ T/ F, P' h1  1  19 a; P- W0 o+ Z5 _  D0 F

6 S. o, j- u/ k( i- J) @1  2  3
) v% }+ }6 G! N# @+ k7 f: y: q% R
1  3  6
+ C0 q1 h3 P8 B! l# m2 h$ C# R7 s0 u9 a; i/ J
验证下:
0 [0 D/ |& J( ~1 u8 R/ V( _
- S+ r; D; A3 h$ z1 }  t& l' x+ o, M>> pascal(3)
9 ?; x! {% Q7 Q! M4 n) j6 y: I
  v! E, r$ _- K" A2 [/ H- U7 Fans =
' ]! I7 f; R, n7 ]# T& v, o7 f9 J8 B  I1 D! R' K7 x
     1     1     1! S# M( M3 b; o6 U# Z0 x1 w
     1     2     3# T% o% S' v6 i# \9 S
     1     3     6
* x" f8 P+ @) H% c" {0 i) R/ }
# F6 J5 c3 \% H: I# d确实如此!
: [' V# a) y* F- b3 I, j0 B3 J( q& S5 b1 v  ~* h- C! J) o

, ?1 x  K' ^3 |9 C

该用户从未签到

2#
发表于 2020-1-10 17:48 | 只看该作者
MATLAB的Pascal matrix 学习
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-11-24 11:22 , Processed in 0.171875 second(s), 27 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表