Combining the data

6 次查看(过去 30 天)
kash
kash 2012-1-9
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

采纳的回答

Andrew Newell
Andrew Newell 2012-1-9
[F(1:end-1)' F(2:end)']

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-1-9
reshape(F, 2, []).'
  2 个评论
kash
kash 2012-1-9
Thanks walter
kash
kash 2012-1-9
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by