Unprotect
- To: mathgroup at smc.vnet.net
- Subject: [mg120889] Unprotect
- From: Themis Matsoukas <tmatsoukas at me.com>
- Date: Sun, 14 Aug 2011 08:15:20 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
I want to redefine a build in command. I use the following example: Unprotect[Entropy]; Entropy[x_] := 1/x Entropy[10.] When I execute these commands on a fresh kernel I get: SetDelayed::write: Tag Entropy in Entropy[x_] is Protected. >> $Failed Entropy::targ: Argument 10.` at position 1 should be a List, a SparseArray, or a String. >> Entropy[10.] If I execute a second time I get my definition to work but I still get a warning about the arguments: Entropy::targ: Argument 10.` at position 1 should be a List, a SparseArray, or a String. >> 0.1 So, two questions: 1. Do I have to execute twice to cause a custom definition to stick? 2. How do I get rid of the warning once the custom definition works? Running 8.01 on Lion. {"8.0 for Mac OS X x86 (64-bit) (February 24, 2011)", 1} Themis
- Follow-Ups:
- Re: Unprotect
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: Unprotect