Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

ReplacePart

Usage
Notes
Further Examples

Here is a list.

In[1]:=  

This replaces {b, c} by X.

In[2]:=  

Out[2]=

This replaces the element b at position {2, 1} of vv by X.

In[3]:=  

Out[3]=

This replaces the elements at positions 2 and 4 of vv by X.

In[4]:=  

Out[4]=

Here is another list.

In[5]:=  

Here are the elements of vv and ww at the specified positions.

In[6]:=  

Out[6]=

In[7]:=  

Out[7]=

This replaces b by  and d by  .

In[8]:=  

Out[8]=

The defined function EvaluateAt evaluates a held expression exactly at a specified list of positions.

In[9]:=  

Here 3 + 4 and 2*4 get evaluated.

In[10]:=  

Out[10]=

This defines the function ApplyAt which applies a function to the held parts of an expression at specified positions.

In[11]:=  

In[12]:=  

In[13]:=  

This applies Power at positions  and  .

In[14]:=  

Out[14]=

This defines the function ReplaceAt which applies a rule or a list of rules to the parts of an expression at specified positions.

In[15]:=  

In[16]:=  

In[17]:=  

In[18]:=  

This applies a list of two rules at positions  and  .

In[19]:=  

Out[19]=

In[20]:=  


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: