# How to use subscript in pattern names?

For example I want to define a function with parameters σx and σy, that is, the function will be declared as:

f[σx_,σy_] := . . .

I tried Symbolize but it doesn't work. How can I use Subscript in pattern names?

-

You can use Symbolize, from the Notation package following the tutorial as you did.

Then, just take the precaution of writing the pattern with its head explicit, such as:

Pattern[xr, _]

The problem is that Mathematica can't interpret the short notation for patterns (xr_ for example) if it has a box structure before the "_"

-

You can also use the input form in the definition

f[Subscript[\[Sigma], x_], Subscript[\[Sigma], y_]] := ...

-
CarloB, welcome to the site. I don't believe this works in the way the OP wants. It would require entering your values as subscripts to sigma for each argument. – Mr.Wizard Mar 13 '12 at 14:26