在 Octave/Matlab 中将 1 行拆分为多行
我在八度/matlab 的数组中有 1 行和数百列,
example of a row:
540 6.28319 0 538.3 6.26573 0
我希望它看起来像这样。每第三列将数据移动到下一行。
540 6.28319 0
538.3 6.26573 0
我确实尝试过:
tmp = [540 6.28319 0 538.3 6.26573 0];
a = reshape(tmp, [], 3); but that gives me
540 0 6.26573
6.28319 538.3 0
我想知道
540 6.28319 0
538.3 6.26573 0
我该怎么做? 谢谢
I have 1 row with hundreds of columns in an array in octave/matlab
example of a row:
540 6.28319 0 538.3 6.26573 0
I would like it to look like this. Every 3rd column move data to next row.
540 6.28319 0
538.3 6.26573 0
I did try:
tmp = [540 6.28319 0 538.3 6.26573 0];
a = reshape(tmp, [], 3); but that gives me
540 0 6.26573
6.28319 538.3 0
I'm trying to get
540 6.28319 0
538.3 6.26573 0
How can I go about doing this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
给出:
gives: