本文共 1392 字,大约阅读时间需要 4 分钟。
1、零空间函数
>> A = [1 2 3 4;5 6 7 8;9 10 11 12;13 14 15 16]
A =
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
>> null(A)
ans =
0.2826 -0.4692
-0.7265 0.4150
0.6053 0.5776
-0.1614 -0.5234
2、正交空间函数
>> B = magic(8)
B =
64 2 3 61 60 6 7 57
9 55 54 12 13 51 50 16
17 47 46 20 21 43 42 24
40 26 27 37 36 30 31 33
32 34 35 29 28 38 39 25
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1
>> orth(B)
ans =
-0.3536 0.5401 0.3536
-0.3536 -0.3858 -0.3536
-0.3536 -0.2315 -0.3536
-0.3536 0.0772 0.3536
-0.3536 -0.0772 0.3536
-0.3536 0.2315 -0.3536
-0.3536 0.3858 -0.3536
-0.3536 -0.5401 0.3536
3、伪逆函数
>> C = magic(6)
C =
35 1 6 26 19 24
3 32 7 21 23 25
31 9 2 22 27 20
8 28 33 17 10 15
30 5 34 12 14 16
4 36 29 13 18 11
>> pinv(C)
ans =
0.0115 -0.0386 0.0254 0.0054 -0.0139 0.0192
0.0023 -0.0201 0.0162 0.0146 -0.0324 0.0285
-0.0081 0.0030 -0.0151 0.0042 0.0277 -0.0027
0.0540 -0.0417 -0.0016 0.0601 -0.0664 0.0046
-0.0409 0.0231 0.0285 -0.0533 0.0355 0.0162
-0.0097 0.0833 -0.0444 -0.0220 0.0586 -0.0568
>> inv(C)
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.600321e-18.
ans =
1.0e+15 *
-1.1259 -0.0000 1.1259 1.1259 -0.0000 -1.1259
-1.1259 -0.0000 1.1259 1.1259 -0.0000 -1.1259
0.5629 0.0000 -0.5629 -0.5629 0.0000 0.5629
1.1259 0.0000 -1.1259 -1.1259 0.0000 1.1259
1.1259 0.0000 -1.1259 -1.1259 0.0000 1.1259
-0.5629 0 0.5629 0.5629 -0.0000 -0.5629
转载地址:http://qldnv.baihongyu.com/