- #1
ramparts
- 45
- 0
Probably a basic Mathematica question but after trying a few things I'm stumped.
I have a table with some x values and a range of data that are dependent on those values, call them a(x), b(x), c(x), etc. So the table looks like
{ {x1, a1, b1, c1}, {x2, a2, b2, c2}, {x3, a3, b3, c3}, etc. }
I want to create pairs of points like
{ {x1, a1}, {x2, a2}, {x3, a3}, etc. }
{ {x1, b1}, {x2, b2}, {x3, b3}, etc. }
and so on. That is, I need to create new matrices extracting particular columns from the original matrix. I need these pairs so I can do things like plot a(x) against x (using ListPlot), create InterpolatingFunctions for a(x), b(x), etc. I've tried a few things (Append, Delete, Take) which almost work but don't quite. What's the best Mathematica way to do this?
I have a table with some x values and a range of data that are dependent on those values, call them a(x), b(x), c(x), etc. So the table looks like
{ {x1, a1, b1, c1}, {x2, a2, b2, c2}, {x3, a3, b3, c3}, etc. }
I want to create pairs of points like
{ {x1, a1}, {x2, a2}, {x3, a3}, etc. }
{ {x1, b1}, {x2, b2}, {x3, b3}, etc. }
and so on. That is, I need to create new matrices extracting particular columns from the original matrix. I need these pairs so I can do things like plot a(x) against x (using ListPlot), create InterpolatingFunctions for a(x), b(x), etc. I've tried a few things (Append, Delete, Take) which almost work but don't quite. What's the best Mathematica way to do this?