Copying values between two index number

1 visualización (últimos 30 días)
JamJan
JamJan el 17 de En. de 2019
Comentada: Image Analyst el 17 de En. de 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 comentario
Image Analyst
Image Analyst el 17 de En. de 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?

Iniciar sesión para comentar.

Respuestas (2)

madhan ravi
madhan ravi el 17 de En. de 2019

Andrei Bobrov
Andrei Bobrov el 17 de En. de 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});

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by