MathGroup Archive 2010

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

Search the Archive

Re: Collecting Positive and Negative Terms


On Sep 7, 9:59 pm, Michael Knudsen <micknud... at gmail.com> wrote:
> 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/SplitExpression.nb
>
> --
> Michael Knudsen

Try   Cases[myExpression,Times[_?Negative,__]]  and
DeleteCases[myExpression,Times[_?Negative,__]] .


  • Prev by Date: Re: Changing from Utopia font to arial
  • Next by Date: Re: What is the problem? There are no images and no wrong reports for
  • Previous by thread: Re: Collecting Positive and Negative Terms
  • Next by thread: Re: Collecting Positive and Negative Terms