Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Do I need to clear some functions?' topicStudent Support Forum > General > "Do I need to clear some functions?"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Forum Moderator
email me
03/26/12 11:35am

i-sub-L needs to be Clear'd, but it is not a variable.

Clear[Subscript[i, L]]
Clear::ssym: "Subscript[i, L] is not a symbol or a string."

Notes on making subscripted variables robust enough for executable code are attached. (If you don't _need_ a subscripted variable, just change i-sub-L to iL.)

The brute-force method is to quit and restart the Mathematica Kernel (Evaluation menu - Quit Kernel). For most cases, Clear can to the job,

In[3]:= a = 1; b = 2;

In[4]:= Clear["Global`*"]

In[5]:= {a, b}
Out[5]= {a, b}
(http://reference.wolfram.com/mathematica/howto/ClearMyDefinitions.html)





Attachment: SubscriptedVariables101.nb, URL: ,

Subject (listing for 'Do I need to clear some functions?')
Author Date Posted
Do I need to clear some functions? Ed Nowak 03/26/12 02:22am
Re: Do I need to clear some functions? Forum Modera... 03/26/12 11:35am
Re: Re: Do I need to clear some functions? Ed Nowak 03/26/12 8:29pm
Re: Re: Re: Do I need to clear some functions? Forum Modera... 03/27/12 1:19pm
Re: Re: Re: Do I need to clear some functions? Bill Simpson 03/27/12 2:30pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic