Group Abstract Group Abstract

Message Boards Message Boards

1
|
4.6K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Use Around function for lists?

Posted 7 years ago
POSTED BY: Henry Sewell
3 Replies
Posted 7 years ago

Using MapIndexed rather than Replace

data // MapIndexed[{Around[First@#1, errors[[#2]]], Sequence @@ Rest@#} &]
POSTED BY: Rohit Namjoshi
Posted 7 years ago

Perfect thank you

POSTED BY: Henry Sewell
Posted 7 years ago

Hi Henry,

How about

Transpose[{data, errors}] /. {{a_, b_, c_}, d_} :> {Around[a, d], b, c}
(* {{a1±e1,b1,c1},{a2±e2,b2,c2},{a3±e3,b3,c3}} *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard