Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

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

Search the Archive

re: MapAt complaint

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: re: MapAt complaint
  • From: wmm at chem.wayne.edu (Martin McClain)
  • Date: Wed, 10 Nov 93 09:23:15 EST

Dear MathGroupers:
        Here is an edited and improved exchange that gives me what I wanted
to know.  Thanks to all who replied.
Regards-  Martin

Part of my reply to Daniel Lichtblau, WRI:

Thanks, Daniel.  My complaint is not so much about this particular example,
but rather it is the inability of MapAt to work on a selected set of parts
of an expression, treating them as a whole (particularly if they are just
some summands chosen out of a sum).  Many Mma operators with part
specifications allow you to do this, but as far as I can see, MapAt does
not.  For example:

In[1]:   expr = 1+Sin[a+b]+Sin[a-b];

In[2]:   Take[expr,{2,3}]
Out[2]:  Sin[a+b]+Sin[a-b]

But if you try

In[3]:=  MapAt[Simplify, expr, {2,3}]
ERROR:  PART{2,3} DOES NOT EXIST

Often you can see some parts of a sum or a product that would simplify- it
makes you want to darken them with the mouse, and then apply some operator.
I asked Stephen Wolfram at the Mma Day in Ann Arbor whether the new mouse
facility in version 2.3 could select a part of an expression for this
purpose, and he showed me that it could.  But can it select two or more
disparate parts and treat them as a whole?  Alternatively, will MapAt will
be extended in version 2.3?
Thanks again-  Martin

Daniel's reply:
I do not believe that MapAt will change in functionality,  
but it may be that the "extraction" could happen under mouse control.  
I'll ask around. If I learn anything I'll  pass it on.

Later, via danl:

Begin forwarded message:

Date: Tue, 9 Nov 1993 16:43:31 -0800
From: Neil Soiffer <soiffer>
To: danl at wri.com
Subject: Re: MapAt complaint
Cc: wri-kernel at wri.com

In 2.3, you can select an arbitrary subexpression (such as "b+c" in  
"a+b+c").
You can then do what you want with it.  For the particular example,
clicking on the "Simplify[]" palette button will cause an inplace
simplfy to occur, with the result displayed on a new line below.

2.3 will not have the ability to make multiple selections.
That will come in 2.4 or later.  You can, of course, do a copy and a  
paste into a new cell, copy the next thing, paste, etc.

	Neil






  • Prev by Date: Re: MapAt Complaint
  • Next by Date: Re: Error in Mathematica?
  • Previous by thread: Re: MapAt Complaint
  • Next by thread: MapAt complaint