【发布时间】:2015-04-17 01:08:16
【问题描述】:
尝试成功地做到这一点让我感到很煎熬。我在size(A) = [100 612] 的矩阵中有数据A。列数据由 51 个站点以 12 个月为单位,即总共 612 列。
我需要创建一个索引来选择这个序列中的列; 1:51:612,然后是 2:51:612,等等,直到 51:51:612。最终的数组应该是一个 100 行 x 612 列的矩阵,具有这个序列
Row 1: Columns 1-12=(1,52,103,154,205,256,307,358,409,460,511,562)
Columns 13-24=(2,53,104,155,206,257,308,359,410,461,512,563)
...
etc to the end of the first row with the last 12 columns with these numbers
Columns 601-612=(51,102,153,204,255,306,357,408,459,510,561,612).
然后重复 100 次以给出 100 行。我需要将其用作逻辑索引来提取或重新排序上面给出的A 中的原始数据。
【问题讨论】:
标签: arrays matlab matrix indexing