I have the 3 lists
t={1,2,3,4} ch1={15,16,17,18} ch2={23,24,25,26}
from which I want to create a new list
{{1,15,23},{2,16,24},{3,17,25},{4,18,26}}
How to do that?
Neither Join, Append nor Catenate help with it.
Join
Append
Catenate
Any idea?
Transpose@{t, ch1, ch2} // Prepend[{"t", "ch1", "ch2"}] // Export["test.csv", #] &
Hi Ehud,
Transpose@{t, ch1, ch2} (* {{1, 15, 23}, {2, 16, 24}, {3, 17, 25}, {4, 18, 26}} *)
Thanks! Can you also show me how to export this new list to a csv file that has the structure
t,ch1,ch2 1,15,23 2, 16, 24 3, 17, 25 4, 18, 26
?
check out MapThread[]