I have three lists:
x = {x1, x2, ...},
y = {y1, y2, ...},
yErr = {y1Err, y2Err, ...}
that I want to join into the following format:
{{{x1, Around[y1, y1Err]}, {x2, Around[y2, y2Err]}, ...}}
How can I do this automatically?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityPerhaps
MapThread[{#1,Around[#2,#3]}&,{x,y,yErr}]
is what you are looking for.
You can also use
{#, Around @ ##2} & @@@ Transpose[{x, y, yErr}]
or
Transpose[{x, Around @@@ Transpose[{y, yErr}]}]