Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10834 > unrolled thread

what would cause a symbol not to clear using Clear[name] or Remove[name]?

Started by"Nasser M. Abbasi" <nma@12000.org>
First post2012-07-08 22:58 +0000
Last post2012-07-11 06:21 +0000
Articles 5 — 4 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  what would cause a symbol not to clear using Clear[name] or Remove[name]? "Nasser M. Abbasi" <nma@12000.org> - 2012-07-08 22:58 +0000
    Re: what would cause a symbol not to clear using Clear[name] or Remove[name]? Helen Read <readhpr@gmail.com> - 2012-07-09 02:45 +0000
      Re: what would cause a symbol not to clear using Clear[name] or Remove[name]? "Nasser M. Abbasi" <nma@12000.org> - 2012-07-09 09:23 +0000
    Re: what would cause a symbol not to clear using Clear[name] or Remove[name]? David Bailey <dave@removedbailey.co.uk> - 2012-07-10 04:40 +0000
    Re: what would cause a symbol not to clear using Clear[name] or Remove[name]? John Doty <noqsiaerospace@gmail.com> - 2012-07-11 06:21 +0000

#10834 — what would cause a symbol not to clear using Clear[name] or Remove[name]?

From"Nasser M. Abbasi" <nma@12000.org>
Date2012-07-08 22:58 +0000
Subjectwhat would cause a symbol not to clear using Clear[name] or Remove[name]?
Message-ID<jtd3al$9fq$1@smc.vnet.net>
Any experts here would explain why such a strange thing can happen?

I do Clear[y] and then do ??y and it still shows the same expression as before.

I also tried Remove[y], and it is still not clearing.

--------------------------
In[132]:= Clear[y]

In[133]:= y
Out[133]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])

In[134]:= Remove[y]
In[135]:= y
Out[135]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])

In[136]:= ??y
Global`y
y=(0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])/208694150

In[140]:= Clear["Global`*"]
In[141]:= y
Out[141]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]

In[142]:= Remove["Global`*"]
In[143]:= y
Out[143]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
--------------------------------

?Remove
removes symbols completely, so that their names are no longer recognized by Mathematica.

In[139]:= $Version[]
Out[139]= 8.0 for Microsoft Windows (64-bit) (October 6, 2011)[]

Here is a video of it in this folder, but it is 70 MB AVI file (in need
to figure out how to reduce the size of an AVI file). This in
case someone thinks I am making this up :)

http://12000.org/tmp/070812/

Only after I close the kernel, will this symbol finally clear up.

In[2]:= y
Out[2]= y

Do you think this is strange? or is there a rational explanation to it?
I have thought always that Clear[] will clear a symbol.

thanks,
--Nasser







[toc] | [next] | [standalone]


#10846

FromHelen Read <readhpr@gmail.com>
Date2012-07-09 02:45 +0000
Message-ID<jtdgl7$aj3$1@smc.vnet.net>
In reply to#10834
Is it possible you had two kernels running?

HPR

On 7/8/2012 6:58 PM, Nasser M. Abbasi wrote:
> Any experts here would explain why such a strange thing can happen?
>
> I do Clear[y] and then do ??y and it still shows the same expression as before.
>
> I also tried Remove[y], and it is still not clearing.
>
> --------------------------
> In[132]:= Clear[y]
>
> In[133]:= y
> Out[133]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[134]:= Remove[y]
> In[135]:= y
> Out[135]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[136]:= ??y
> Global`y
> y=(0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])/208694150
>
> In[140]:= Clear["Global`*"]
> In[141]:= y
> Out[141]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
>
> In[142]:= Remove["Global`*"]
> In[143]:= y
> Out[143]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
> --------------------------------
>
> ?Remove
> removes symbols completely, so that their names are no longer recognized by Mathematica.
>
> In[139]:= $Version[]
> Out[139]= 8.0 for Microsoft Windows (64-bit) (October 6, 2011)[]
>
> Here is a video of it in this folder, but it is 70 MB AVI file (in need
> to figure out how to reduce the size of an AVI file). This in
> case someone thinks I am making this up :)
>
> http://12000.org/tmp/070812/
>
> Only after I close the kernel, will this symbol finally clear up.
>
> In[2]:= y
> Out[2]= y
>
> Do you think this is strange? or is there a rational explanation to it?
> I have thought always that Clear[] will clear a symbol.
>
> thanks,
> --Nasser
>
>
>
>
>
>
>
>



[toc] | [prev] | [next] | [standalone]


#10853

From"Nasser M. Abbasi" <nma@12000.org>
Date2012-07-09 09:23 +0000
Message-ID<jte7v9$srp$1@smc.vnet.net>
In reply to#10846
On 7/8/2012 9:45 PM, Helen Read wrote:
> Is it possible you had two kernels running?
>
> HPR
>

No. I use only one instance of Mathematica.

Sometimes I run Mathematica demos on the Wolfram
demo web page from the browser, and that starts
its own Mathematica kernel, but it should not
have anything to do with my notebook I am running
in another separate Mathematica application.

thanks,
--Nasser

[toc] | [prev] | [next] | [standalone]


#10863

FromDavid Bailey <dave@removedbailey.co.uk>
Date2012-07-10 04:40 +0000
Message-ID<jtgbnt$47f$1@smc.vnet.net>
In reply to#10834
On 08/07/2012 23:58, Nasser M. Abbasi wrote:
> Any experts here would explain why such a strange thing can happen?
>
> I do Clear[y] and then do ??y and it still shows the same expression as before.
>
> I also tried Remove[y], and it is still not clearing.
>
> --------------------------
> In[132]:= Clear[y]
>
> In[133]:= y
> Out[133]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[134]:= Remove[y]
> In[135]:= y
> Out[135]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[136]:= ??y
> Global`y
> y=(0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])/208694150
>
> In[140]:= Clear["Global`*"]
> In[141]:= y
> Out[141]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
>
> In[142]:= Remove["Global`*"]
> In[143]:= y
> Out[143]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
> --------------------------------
>
> ?Remove
> removes symbols completely, so that their names are no longer recognized by Mathematica.
>
> In[139]:= $Version[]
> Out[139]= 8.0 for Microsoft Windows (64-bit) (October 6, 2011)[]
>
> Here is a video of it in this folder, but it is 70 MB AVI file (in need
> to figure out how to reduce the size of an AVI file). This in
> case someone thinks I am making this up :)
>
> http://12000.org/tmp/070812/
>
> Only after I close the kernel, will this symbol finally clear up.
>
> In[2]:= y
> Out[2]= y
>
> Do you think this is strange? or is there a rational explanation to it?
> I have thought always that Clear[] will clear a symbol.
>

Try executing

??Clear

??Remove

Just to see if you have somehow removed the protection on these symbols 
and redefined them.

Do you automatically load anything?

Does this happen immediately on startup:

y=42;

Clear[y]

y

Or only after you ran something?

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [prev] | [next] | [standalone]


#10874

FromJohn Doty <noqsiaerospace@gmail.com>
Date2012-07-11 06:21 +0000
Message-ID<jtj60f$5oa$1@smc.vnet.net>
In reply to#10834
Beware of upvalues:

f_[whoCalled] ^:= f

whoCalled=me

Clear[whoCalled]
Clear

whoCalled
me

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web