40

22

Here's a small listing where I've used `Esc``q``Esc` to typeset `θ`

in the notebook:

```
Clear[ f, θ, Subscript[x, r] ]
Subscript[x, r] := 3
f[θ_] := Subscript[x, r] Cos[θ]
Plot[f[θ], {θ, 0, Pi}]
```

(in my notebook this looked like $x_r$, not `Subscript[x, r]`

for example).

This produces a message from `Clear`

of the form:

```
Clear::ssym : x_r is not a symbol or a string
```

What is curious is that I appear to be able to assign to this variable $x_r$ without any trouble, yet it is apparently treated differently than my other symbols `f`

and `θ`

.

How exactly does Mathematica define a symbol. Why can I use $x_r$ like a variable, yet it does not have this symbol characterization?

Related: https://groups.google.com/d/topic/comp.soft-sys.math.mathematica/WEXBolRa15Y/discussion

– Szabolcs – 2012-01-24T15:46:35.737If you are unfamiliar with

– Mike Honeychurch – 2012-01-20T23:22:34.670`DownValue`

,`OwnValue`

and so on it is worth reading this post http://mathematica.stackexchange.com/questions/96/what-is-the-distinction-between-downvalues-upvalues-subvalues-and-ownvalues in addition to the answers below.Related: (1004)

– Mr.Wizard – 2013-09-05T09:27:41.657