Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I don't understand how to remove the values for these subscripted variables once I have assigned a number to them. If I try to remove the value from a_1 below, I get an error message:

So substituting a_1 and a_2 into myf does what it's suppose to do. In the first case, the value of a_1 is substituted into myf and in the second, the variable name a_2 is substituted. Now, suppose I want to remove the value from a_1 so that when I next try to substitute into myf, the variable name a_1 is used and not the value of a_1. If I try to use Clear[a_1] or Remove[a_1] it tells me that's not a variable name and if I use Remove[a], then all the values of a are removed including the ones I want to keep.Code (Text):

Remove[a]

Subscript[a, 1] = 1;

myf = z^3 + z*w^2

myf /. z -> Subscript[a, 1]

myf /. z -> Subscript[a, 2]

Clear[Subscript[a, 1]]

Thanks guys,

Jack

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [Mathematica] Trouble understanding subscripted variables

Loading...

Similar Threads for Mathematica Trouble understanding |
---|

Mathematica Storing Mathematica output |

Mathematica Mathematica to MATLAB |

Mathematica Cannot do the integral of the Hyper-geometric function? |

Mathematica Cannot Plot This Function in Mathematica |

Mathematica While Loop in Mathematica |

**Physics Forums | Science Articles, Homework Help, Discussion**