矩阵运算符将矩阵的行堆叠在“对角线”上
我正在寻找一个执行以下操作的矩阵运算符(或数学表达式):
我有一个尺寸3 x 5的矩阵a:
a_11 a_12 a_13 a_14 a_15
a_21 a_22 a_23 a_24 a_25
a_31 a_32 a_33 a_34 a_35
我想获得矩阵3 x 15:
a_11 a_12 a_13 a_14 a_15 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 a_21 a_22 a_23 a_24 a_25 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 a_31 a_32 a_33 a_34 a_35
我试图使用kronecker产品,但我没有' T到达任何解决方案。
I am looking for a matrix operator (or a mathematical expression) that does the following:
I have a matrix A of dimension 3 by 5:
a_11 a_12 a_13 a_14 a_15
a_21 a_22 a_23 a_24 a_25
a_31 a_32 a_33 a_34 a_35
I want to obtain the matrix 3 by 15:
a_11 a_12 a_13 a_14 a_15 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 a_21 a_22 a_23 a_24 a_25 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 a_31 a_32 a_33 a_34 a_35
I have tried to use Kronecker products but I didn't arrive to any solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下内容来解决它:
You could solve it using the following:
不是矩阵-algebra的表达式,但如果它有所帮助:可以使用
num2cell
将矩阵拆分为其行的单元格数组,然后通过a comma-separated listblkdiag
:Not a matrix-algebra expression, but in case it helps: this can be easily done using
num2cell
to split the matrix into a cell array of its rows, and passing a comma-separated list of those rows toblkdiag
: