Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15322 > unrolled thread
| Started by | Tomas Garza <tgarza10@msn.com> |
|---|---|
| First post | 2013-08-17 06:00 +0000 |
| Last post | 2013-08-17 06:00 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to remove external parentheses from a list Tomas Garza <tgarza10@msn.com> - 2013-08-17 06:00 +0000
| From | Tomas Garza <tgarza10@msn.com> |
|---|---|
| Date | 2013-08-17 06:00 +0000 |
| Subject | Re: How to remove external parentheses from a list |
| Message-ID | <kun3i7$3ne$1@smc.vnet.net> |
Try using Sequence: as an example, suppose you have
list = {{x, 0, 2}, {y, 0, 1}}
which you want to use as the list of integration variables and limits. Then, by successively clicking on any of the inner brackets, select the elements of list without the outer brackets, copy and paste to get
NIntegrate[Exp[-x y], Sequence[{x, 0, 2}, {y, 0, 1}]]
1.31926
-Tomas
> From: sy81@sussex.ac.uk
> Subject: How to remove external parentheses from a list
> To: mathgroup@smc.vnet.net
> Date: Fri, 16 Aug 2013 07:06:19 -0400
>
>
> 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
>
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web