Matlab矩陣運算函式-blkdiag函式
阿新 • • 發佈:2018-12-20
1、blkdiag函式:生成指定對角線元素的矩陣
2、用法說明
A = blkdiag(a,b,c,d,...) 函式產生以a,b,c,d,...為對角線元素的矩陣A
3、舉例說明
4、附錄>> x = blkdiag(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)x = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16
>> help blkdiag blkdiag Block diagonal concatenation of matrix input arguments. |A 0 .. 0| Y = blkdiag(A,B,...) produces |0 B .. 0| |0 0 .. | Class support for inputs: float: double, single See also diag, horzcat, vertcat Overloaded methods: InputOutputModel/blkdiag Reference page in Help browser doc blkdiag