|
[Date Index]
[Thread Index]
[Author Index]
Eliminating Annoying Minus Signs
- To: mathgroup at smc.vnet.net
- Subject: [mg58756] Eliminating Annoying Minus Signs
- From: "David Park" <djmp at earthlink.net>
- Date: Sun, 17 Jul 2005 03:04:06 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Here is an expression that has annoying minus signs in it.
test = {-((2*x)/(-1 + z)), -((2*y)/(-1 + z)), -1};
We can get rid of them with the following operation.
MapAt[Minus, test, {{1, 1}, {1, 3, 1}, {2, 1}, {2, 3, 1}}]
{(2*x)/(1 - z), (2*y)/(1 - z), -1}
But it involves ferreting out the two positions at which we want to change signs and so is a little tedious and error prone.
Does someone have a simpler method for simplifying such expressions, which occur quite often with Mathematica?
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
Prev by Date:
Re: Polynomial eigenvalue problem
Next by Date:
Trace[ Through [ (Max - Min) [ {1, 2, 3, 4, 5} ] ] ]
Previous by thread:
Re: How to create a new Form
Next by thread:
Re: Eliminating Annoying Minus Signs
|