Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • $\begingroup$ Welcome to the community. Use ClearAll (ClearAll[AnI]) to remove all the definitions of a symbol like AnI[1], AnI[2], ... or Unset for a single case like: Unset[AnI[1]]. $\endgroup$ Commented Jul 11, 2022 at 3:51
  • $\begingroup$ @BenIzd, ClearAll[AnI[n], AnI[2]] can not work, and the hint is ClearAll::ssym: AnI[n] is not a symbol or a string. and ClearAll::ssym: AnI[2] is not a symbol or a string. $\endgroup$ Commented Jul 11, 2022 at 4:57
  • $\begingroup$ @BenIzd, and the Unset can not work as well, the hint is Unset::norep: Assignment on AnI for AnI[n] not found. $\endgroup$ Commented Jul 11, 2022 at 5:02
  • $\begingroup$ ClearAll should be called with only the symbol name and it will clear all the existing definitions for that symbol like ClearAll[AnI]. On the Unset message, if you don't set any value and want to unset it, it'll raise a message as you've seen. You can suppress that with Quiet. $\endgroup$ Commented Jul 11, 2022 at 5:14
  • $\begingroup$ Dear @fhrl, your questions take a lot of effort to read. You should make it as simple as possible, so that one can very clearly understand what the actual question is. For example, do not use complicated equations if much simpler equations suffice to ask your question. Please become familiar with the idea of a minimal working example (MWE) as in here. $\endgroup$ Commented Jul 11, 2022 at 6:12