Message Boards Message Boards

0
|
4546 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

How to clear an indexed variable

Posted 10 years ago

I first assign a symbolic value to an indexed variable Subscript[v, i ]
How can I later clear this assignment ? I tried unsuccessfully with Clear and ClearAll.

In[110]:= Subscript[v, i ]= i ^2
Out[110]= i^2
In[111]:= Subscript[v, i ]
Out[111]= i^2
In[112]:= Clear[Subscript[v, i ]]
In[113]:= Subscript[v, i ]
Out[113]= i^2
In[115]:= Clear["Subscript[v, i]"]
In[116]:= Subscript[v, i ]
Out[116]= i^2
In[117]:= ClearAll[Subscript[v, i ]]
In[118]:= Subscript[v, i ]
Out[118]= i^2
In[119]:= ClearAll["Subscript[v, i]"]
In[120]:= Subscript[v, i ]
Out[120]= i^2
POSTED BY: Charles B
2 Replies

Try

  Subscript[v, i] =.
POSTED BY: Nasser M. Abbasi
Posted 10 years ago

Perfect ! That works.

POSTED BY: Charles B
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract