Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 14 down vote accepted

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 "_"

share|improve this answer

You can also use the input form in the definition

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

share|improve this answer
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.