I want to express the following function:
$z^{(1)}=w^{(1)}a^{(0)}+b^{(1)}$
I have read in Mathematica documentation that Symbolize
can be used to define variables with superscripts. I would like to define a function that uses $w^{(1)}$, $a^{(0)}$ and $b^{(1)}$ as dependent variables.
This is what I have tried:
<< Notation`
Symbolize[NotationTemplateTag[z^(1)]]
Symbolize[NotationTemplateTag[w^(1)]]
Symbolize[NotationTemplateTag[a^(0)]]
Symbolize[NotationTemplateTag[a^(1)]]
Symbolize[NotationTemplateTag[b^(1)]]
And then I try to define the variable as:
(z^(1))[w^(1)_, a^(0)_, b^(1)_] := w^(1) a^(0) + b^(1)
but I get $Failed
.
Is it possible to define a function named with a superscript and having as dependent variables symbols with superscripts? I so, what is not properly done above?
z^(1)
is interpreted asPower[z,1]
and simplifying toz
automatically. You could tryTrace
andFullForm
. $\endgroup$z[1]
instead. $\endgroup$