Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: How to remove external parentheses from a list
Replies: 4   Last Post: Aug 17, 2013 2:00 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Murray Eisenberg

Posts: 2,105
Registered: 12/6/04
Re: How to remove external parentheses from a list
Posted: Aug 17, 2013 1:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

One way is to use Sequence with Apply (@@). For example:

Integrate[x1 + x2^2, Sequence @@ {{x1, a, b}, {x2, c, d}}]

On Aug 16, 2013, at 7:06 AM, Samuel Mark Young <sy81@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.
>
> Thanks for any help and advice!
>
> Regards,
> Sam
>


---
Murray Eisenberg
murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305





.





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.