MathGroup Archive 2010

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

Search the Archive

Re: Collecting Positive and Negative Terms

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112302] Re: Collecting Positive and Negative Terms
  • From: Michael Knudsen <micknudsen at gmail.com>
  • Date: Wed, 8 Sep 2010 00:59:48 -0400 (EDT)
  • References: <i45rc9$g2p$1@smc.vnet.net>

On Aug 14, 12:32 pm, Bob Hanlon <hanl... at cox.net> wrote:

> myExpression = a + b - c;
>
> DeleteCases[myExpression, Times[-1, ___]]
>
> a+b

Dammit! I was a little too fast with my reply. For some reason, it
fails when I apply to one of my big expressions. Both postive and
negative terms survive then.

Here is an example of when it goes wrong:

http://commondatastorage.googleapis.com/michael_knudsen_various/SplitExpres=
sion.nb

--
Michael Knudsen


  • Prev by Date: Re: Collecting Positive and Negative Terms
  • Next by Date: Re: problem with RandomInteger
  • Previous by thread: Re: Collecting Positive and Negative Terms
  • Next by thread: Re: Collecting Positive and Negative Terms