Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / Assignments  /
Unprotect

  • Unprotect[ , , ... ] removes the attribute Protected for the symbols .
  • Unprotect[" ", " ", ... ] unprotects all symbols whose names textually match any of the .
  • A typical sequence in adding your own rules for built-in functions is Unprotect[ f ]; definition ; Protect[ f ].
  • See notes for Protect.
  • See the Mathematica book: Section 2.4.12Section A.3.12.
  • See also: Protect, Locked, SetOptions.

    Further Examples

    Logs of products are not automatically broken up into a sum of logs.

    In[1]:=

    Out[1]=

    After unprotecting Log we can define a new transformation rule.

    In[2]:=

    Out[2]=

    We apply the rule and then get rid of it, reprotect the Log function.

    In[3]:=

    Out[3]=

    In[4]:=

    In[5]:=

    Out[5]=

    The Clear did not get rid of system definitions.

    In[6]:=

    Out[6]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.