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


Groups > comp.soft-sys.math.mathematica > #1595 > unrolled thread

Re: Selecting round parentheses arguments

Started byJJ <wateronwildfire@gmail.com>
First post2011-04-11 11:07 +0000
Last post2011-04-11 11:07 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Selecting round parentheses arguments JJ <wateronwildfire@gmail.com> - 2011-04-11 11:07 +0000

#1595 — Re: Selecting round parentheses arguments

FromJJ <wateronwildfire@gmail.com>
Date2011-04-11 11:07 +0000
SubjectRe: Selecting round parentheses arguments
Message-ID<inundn$2eu$1@smc.vnet.net>
I see, thank you again for the explanations.

> The problem is once you hit enter so as to make the assignment
> to p, Mathematica will evaluate the RHS of your expression. That
> will eliminate the unneeded paratheses and re-arrange the order
> of the sub terms to a canonical order. That is
>
> In[2]:= p = {a b (c 3 d) + a c (b^2 5), b (c + d 4) - a, -(a^3
> d) c}
>
> Out[2]= {5 a b^2 c+3 a b c d,b (c+4 d)-a,-a^3 c d}
>
> So, the information needed to accomplish what you want is lost.
>
> The simplest way I know to do what you are asking in Mathematica
> is to enter the RHS as a string, use the various string
> functions in Mathematica to extract the desired portion and
> finally use ToExpression to convert the extracted portion of the
> strings to expressions.
>
> The other approach would be to use Hold to prevent evaluation of
> the RHS, then manipulate the result.
>
> But neither of these strike me as being "a quick way" to achieve
> your desired goal.
>
>



> First, if you want to do this by hand, it is possible to click inside an
> expression, and then spread the selection to cover successively larger
> sub-expressions using Ctrl-. This would allow you to select, and then
> copy particular parenthesised expressions.
>
> Alternatively, you could write code to read a cell in BoxForm, and seek
> out sub expressions of the BoxForm of the form RowBox[{"("........ I
> don't know that this would really be worth the effort.
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web