Matlab矩阵划分
我想按近似均匀的行数来划分矩阵。例如,如果我有一个尺寸为 155 x 1000 的矩阵,如何将其除以 10,其中每个新矩阵的尺寸近似为 15 X 1000?
I would like to partition a matrix by an approximate even amount of rows. For example, if I have a matrix by these dimensions 155 x 1000, how can I partition it by 10 where each new matrix has the approximate dimensions 15 X 1000?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个怎么样:
How about this:
这是你想要的吗?
这里唯一的技巧是在下标的函数求值中使用
end
关键字。如果不使用关键字,您可以使用size(x,1)
,但这有点难以阅读。Is this what you want?
The only trick here is the use of the
end
keyword within a function evaluation in the subscripting. Without using the keyword you could usesize(x,1)
, but that is a bit harder to read.