I saw a function defined something like the following:
f[n_Integer][r, θ] = Sin[n r π/L] Cos[n r L π θ/4]
My question is, why did my professor define the function like above, instead of using f[n_Integer, r_, θ_]? What is the difference? I could not find any answers on Mathematica, or google, or here.
If this has been asked before,and I did not find it, I apologize.
Subvalues. But just for calculation purposes, no big difference. – vapor Jun 20 '16 at 03:00f[1, ##] & @@@ something, if wanted. But,f[1] @@ somethingcan be cleaner in some cases. – J. M.'s missing motivation Jun 20 '16 at 03:17f[n_Integer, r, θ]notf[n_Integer, r_, θ_]– m_goldberg Jun 20 '16 at 11:32[r, θ]to get the evaluator to use the this particular definition. As Michael E2 noted, object seems to be to implement indexing onf. – m_goldberg Jun 21 '16 at 00:29