I have an 800*161 matrix and I am trying to plot each column with respect to the 1st column.so I tried the following code
ListLinePlot[
{raw[[All, #]] &[{1, 2}],
raw[[All, #]] &[{1, 3}],
raw[[All, #]] &[{1, 4}],
raw[[All, #]] &[{1, 5}]}
]
where 'raw' is my data set, and it shows like this
and the which also means I have to repeat 161 times and that's too stupid and nasty code. so I tried the following
ListLinePlot[
Do[{raw[[All, #]] &[{1, i}]}, {i, 2, 161}]
]
but it fails. how can I fix it? Thank you so much!
Table[...]
? $\endgroup$Do
(is there a canonical answer?):Do
does exactly what its name implies: itDo
es things. Imagine such a situation: you tell to someone "add 2+2", he replies "ok, done". Then you wait and finally say "you should give me the answer", to which you hear "no, you just wanted me to do the summation, you didn't tell me to return the result or do anything else with it". So,Do
does what you tell it to do, but it's not supposed to return anything. $\endgroup$