Combining the data

F = 3 5 6 15 17 21 35 45 46 51 56 57 66 70 71
please tell how to combine as
3 5
5 6
6 15
15 17
17 21 as on

 Respuesta aceptada

Andrew Newell
Andrew Newell el 9 de En. de 2012

0 votos

[F(1:end-1)' F(2:end)']

Más respuestas (1)

Walter Roberson
Walter Roberson el 9 de En. de 2012

0 votos

reshape(F, 2, []).'

2 comentarios

kash
kash el 9 de En. de 2012
Thanks walter
kash
kash el 9 de En. de 2012
Walter ur code is not working for odd numbers od data
ur code output for my data is
F = 3 5 6 15 17 21 35 45 46 51 56 57 66 70 71
is
3 5
6 15
17 21
but i nees as
3 5
5 6
6 15

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de En. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by