MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to remove external parentheses from a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131529] Re: How to remove external parentheses from a list
  • From: Joe Gwinn <joegwinn at comcast.net>
  • Date: Tue, 20 Aug 2013 07:36:30 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <kul0bk$rkj$1@smc.vnet.net> <kun3ch$3m6$1@smc.vnet.net>

In article <kun3ch$3m6$1 at smc.vnet.net>, Joe Gwinn
<joegwinn at comcast.net> wrote:

> In article <kul0bk$rkj$1 at smc.vnet.net>, Samuel Mark Young
> <sy81 at sussex.ac.uk> wrote:
> 
> > Hello,
> > 
> > I'm looking for an easy way to remove the external parentheses from a list. 
> > The list contains integration variables and their respective limits, it
> > currently looks something like this:
> > 
> > {{x1,a,b},{x2,c,d},...,{xn,y,z}}
> > 
> > However, the Integrate (or NIntegrate function) in Mathematica wants me to
> > write it like this:
> > 
> > {x1,a,b},{x2,c,d},...,{xn,y,z}
> > i.e. The external parentheses have been removed
> > 
> > I've looked around online and seen suggestions for replacing the curly
> > brackets "{" with a blank space " ", or using Apply (@@) but can't work out
> > the correct syntax.
> 
> I use Apply, as in the following, where Xcd is some function:
> 
> Apply[Xcd[#]&, {{x1,a,b}, {x2,c,d}, {xn,y,z}} ]
> 
> Depending the function you are using, you may need to use such things
> as #[[1]] as variables.  Read the docs on "pure functions".

Hmm.  I had not heard of Sequence.  Learned something.

Joe Gwinn



  • Prev by Date: Re: How to remove external parentheses from a list
  • Next by Date: parametric plot and filling
  • Previous by thread: Re: How to remove external parentheses from a list
  • Next by thread: Release of SimulationTools for Mathematica