Copying values between two index number

2 visualizzazioni (ultimi 30 giorni)
JamJan
JamJan il 17 Gen 2019
Commentato: Image Analyst il 17 Gen 2019
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 Commento
Image Analyst
Image Analyst il 17 Gen 2019
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?

Accedi per commentare.

Risposte (2)

madhan ravi
madhan ravi il 17 Gen 2019

Andrei Bobrov
Andrei Bobrov il 17 Gen 2019
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});

Categorie

Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by