Copying values between two index number

2 ビュー (過去 30 日間)
JamJan
JamJan 2019 年 1 月 17 日
コメント済み: Image Analyst 2019 年 1 月 17 日
651 1338 1997 2679 3394 4222 4879 5619 6313 7047 7624 8408
1 1 1 1 1 1 1 1 1 1 1 1
0 1,34 1,28 1,33 1,39 1,61 1,28 1,44 1,35 1,43 1,12 1,53
Hi Everyone,
I have the above table, which in the first row the location is represented and in the third some kind of time interval. Now I want to copy the values of the third row between 1:2500, 2500:5000 and so on of the first row. How can I do this?
Thank you!
  1 件のコメント
Image Analyst
Image Analyst 2019 年 1 月 17 日
This does not make sense: "Now I want to copy the values of the third row between 1:2500, 2500:5000 and so on of the first row."
Are you copying values of "the third row", OR of "the first row"? Or both?
What, exactly is being copied? And where is it copied TO? A new variable? Vectors? A matrix?

サインインしてコメントする。

回答 (2 件)

madhan ravi
madhan ravi 2019 年 1 月 17 日

Andrei Bobrov
Andrei Bobrov 2019 年 1 月 17 日
P = [651 1338 1997 2679 3394 4222 4879 5619 6313 7047 7624 8408
1 1 1 1 1 1 1 1 1 1 1 1
0 1.34 1.28 1.33 1.39 1.61 1.28 1.44 1.35 1.43 1.12 1.53];
out = accumarray(ceil(P(1,:)'/2500),P(end,:)',[],@(x){x});

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by