Because yx=expr
means "evaluate expr
and set the value of y
to it". If expr
contains evaluatable subexpressions, they will be evaluated. Here, you're setting P
after evaluating the expression that contains it. If P
already had a value when you evaluated it in setting yx
, changing its value will have no effect on yx
.
For parameters like this, I like to use rules to define parameter sets. Leave P
, EI
, and L
as undefined symbols, and define a parameter set as:
ps1= {EI->6, L->1000, P->100};
Then, at the point where you're ready to make the substitution of parameters for symbols, write expressions like yx/.ps1
.