Which is to say that if you use a symbolic variable in an expression and later assign a numeric value to the symbol, then the expressions that used the symbolic variable are not automatically updated to use the numeric value.
The situation is exactly the same as if you had used
then afterwards, B is not updated to 25, because at the time the B=A+10 is executed, the value of A (1) is extracted and used.
then afterwards B is not updated to 25, because at the time the B=A+10 is executed, the value of A (sym('A')) is extracted and used.
The line
is the same as
This does not make A identical to the symbol named 'A': it establishes a link to the symbol named 'A', and
would copy that link to the symbol named 'A', not a link to the variable named 'A'.
would break the link between the variable named 'A' and the symbol named 'A', but B does not refer to the variable so B does not get updated to evaluate to 25: it still has the link to the symbol named 'A'.
Symbols themselves live in a different workspace (effectively).
Best Answer