Tagged Questions
0
votes
1answer
63 views
Can I force a function to quit and return some value after a certain amount of time has passed during its evaluation?
Imagine I provide some random input to function like FindInstance[], and I observe that, despite the existence of good solutions, the function will, with some ...
2
votes
3answers
115 views
Alternative to using global variables in functions?
Often times I find myself using unevaluated variables (i.e. they show up blue) as dummy variables in whatever I'm returning such that I can evaluate them as needed later on.
A simple example is as ...
0
votes
0answers
19 views
Define a Plot3D function with custom options [duplicate]
I am trying to define a Plot3D function with custom options, following (this previous SE question), but I'm running into a brick wall. I've narrowed the problem to the following 'toy' code:
...
1
vote
0answers
39 views
Confusing efficiency and evaluation when returning pure functions? [duplicate]
I have a function that takes some time to evaluate, that's meant to be a polynomial approximation to a function. The polynomial is defined by a list of coefficients, so I have the function ...
1
vote
1answer
99 views
Forcing evaluation of ArgMax
How to force evaluation of ArgMax before its output gets used in Solve?
Background: I'm trying to solve for the Nash ...
2
votes
1answer
98 views
8
votes
1answer
110 views
Get the name of a symbol passed to a function
I'm trying to get the name of a symbol passed to a function with this:
f[x_] := {SymbolName[x], x}
SetAttributes[f, HoldFirst]
x = 5;
f[x]
But ...
5
votes
4answers
196 views
Prevent Part[] from trying to extract parts of symbolic expressions
If you have a list, e.g.
{1, 2, 3}
then you can extract the $k$th part using Part (...
4
votes
2answers
182 views
How to make a function that evaluates an expression?
I'm trying to make a function where the input is an expression, but somehow it just won't be evaluated. For example, this little function doesn't work:
...
1
vote
2answers
103 views
How can define a set of nested parameters
I would like to know how I to define a function with a nested set of parameters (or whatever you would like to call it). For example, how would I get the following function ...
5
votes
3answers
227 views
First evaluation fails
I am fairly new to Mathematica (version 7), so please bear with me...
I have duplicated, in Mathematica, a program that I originally wrote in C (it generates OEIS sequence A191837). The problem is ...
3
votes
1answer
166 views
FunctionInterpolation Errors / Question re Evaluation Order and Options
I have using Mathematica functions that takes a Cartesian coordinate relative to the Earth (xyz) and converts it to a latitude, longitude, and altitude (lla). And here it is:
...
23
votes
2answers
681 views
Block attributes of Equal
I answered “Equating matrices (or higher order tensors) element-wise” with:
...

