如何在MATLAB中获得每个元素都是不同大小的矩阵的矩阵?
我正在使用 MATLAB 的数据采集工具箱采集数据序列。我有两个大小不同的矩阵。我希望这两个不同的矩阵成为另一个更大矩阵的元素。有可能实现这一目标吗?
I'm acquiring data sequences using Data Acquisition Toolbox using MATLAB. I've two matrices each of different sizes. I want these two different matrices to be elements of another bigger matrix. Is it possible to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
元胞数组
我不太确定你想要实现什么。
据我了解,您需要一个元胞数组。
写入
后
a
将是一个元胞数组。您可以分别使用a{1}
和a{2}
检索两个矩阵(不同大小)。块对角矩阵
我对你的问题的其他理解是,你可能希望你的两个矩阵成为更大矩阵对角线上的块。然后,您可以使用方括号连接不同的矩阵,并使用
zeros
来填充零:Cell Array
I'm not quite sure what you are trying to achieve.
From what I understand, you need a cell array.
Write
then
a
will be a cell array. You can retrieve your two matrices (of different sizes) usinga{1}
anda{2}
respectively.Block diagonal matrix
My other understanding of your question is that you may want your two matrices to be blocks on the diagonal of a bigger matrix. Then you can use square brackets to concatenate different matrices and
zeros
to pad with zeros: