Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Possible Duplicate:
Clear complains that a variable is not a symbol or a string?

Clear["Global*"]` Works for most variables, however if i do something like

$ \delta_a = \alpha_a \Delta T d $

Then the Clear or ClearAll will not clear $ \delta_a $, short of Quit[] is there anything that can be done to clear variables with subscripts?

share|improve this question

marked as duplicate by Mr.Wizard Feb 23 '12 at 23:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers

up vote 1 down vote accepted

Well. You can always clear a certain value by using Unset

Subscript[r, 3]=8;
Subscript[r, 3]=.;

Now, Clear and ClearAll won't work if you used regular = and assigned the values as Subscript's DownValues. But if you used UpValues, it could work

r/:Subscript[r, 3]=8;
ClearAll[r];
share|improve this answer
add comment

Try Remove.

Subscript[x, k_] = 1/k^2;
Clear[x]
Subscript[x, 2]
Remove[x]
Subscript[x, 2]
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.