Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1558

Selecting round parentheses arguments

From JJ <wateronwildfire@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Selecting round parentheses arguments
Date 2011-04-09 11:13 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <inpf0a$906$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hello again everybody,
Chelly question made me think to something. Suppose I have a list like this:

p={a b (c 3 d)+a c (b^2 5),b (c+d 4)-a,-(a^3 d) c}

in which the round parentheses (except for the middle one) are unnecessary
but play a semantic role by dividing some expressions from others with
different meaning. Now let's say I want to extract the expressions inside
those parentheses and obtain

ans={{c 3 d,b^2 5},c+d 4, a^3 d}

Is there a quick way to do that?

thanks

Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Selecting round parentheses arguments JJ <wateronwildfire@gmail.com> - 2011-04-09 11:13 +0000
  Re: Selecting round parentheses arguments David Bailey <dave@removedbailey.co.uk> - 2011-04-09 22:01 +0000

csiph-web