Mathematica: a simple array

  • Mathematica
  • Thread starter nezse
  • Start date
  • #1
7
0
Hello,
I have a list {a,b,c,d}
and i want a array of the form:
{{a,b},{b,c},{c,d}}
I think it is easy, but I'm new in mathematica and I don't know what funtion to use.
Thanks.
 

Answers and Replies

  • #2
30,034
6,428
lst={a,b,c,d};
Transpose[{Most[lst],Rest[lst]}]
 
  • #3
7
0
Thanks!
 

Related Threads on Mathematica: a simple array

Replies
4
Views
7K
Replies
1
Views
3K
Replies
5
Views
5K
Replies
13
Views
5K
Replies
3
Views
1K
Replies
3
Views
2K
Replies
5
Views
6K
Replies
6
Views
3K
Top