Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 63334

For questions on writing functions (pure or using Set/SetDelayed) for any purpose, including the features that may be incorporated in those functions, such as options, patterns and conditions.

4 votes

How to return unevaluated variable?

Why not define your function with two input variables? myfunction[a_, b_] := Module[{}, 1 + (2 a - 1) b ] That way you can assignments like, Although it's a bit more complex if you want a two-variabl …
Kenric's user avatar
  • 334
4 votes
2 answers
139 views

ProbabilityDistribution with variable number of dimensions

I would like to construct a ProbabilityDistribution with a variable number of dimensions. I tried to use $Assumptions = x ∈ Vectors[d, Reals] so that the variable x would be an unspecified vector wit …
Kenric's user avatar
  • 334
0 votes

ProbabilityDistribution with variable number of dimensions

Thank you JimB, your suggestion worked well. Use of the Sequence function which strips a layer of lists is part of what I was having difficulty with. Here is a simple example of a multivariate norma …
Kenric's user avatar
  • 334
5 votes

How to test a recursive formula using Mathematica?

Without trying to solve the specific problem, here is some guidance on using recursion. First, make sure to use the := symbol, which is SetDelayed. This will make your expressions act like a function …
Kenric's user avatar
  • 334