Tagged Questions
4
votes
2answers
73 views
Creating functions from output of other calculations
Apologies in advance if the title is vague, I'm not really sure what to call this.
I have a function (call it 'foo') that generates a largeish polynomial, and it is natural to make the variables be
...
4
votes
1answer
109 views
Module with “local functions”
I am trying to use a Module having "local functions", i.e., those which I need to define only inside this module.
So I tried this:
...
3
votes
1answer
87 views
Is it safe to assign a variable and function of the same name for different things?
I'm writing out a notebook that goes through the van der Waals Equation of State for gases, and I run into a situation where I want to assign (simplified) Tc[b_]:=5b, use that to solve for b in terms ...
2
votes
0answers
76 views
Evaluating a function on permutations of its arguments
Say I have a function "temp" of $n+1$ variables, $y,z1,z2,z3,...,zn$. I want to test if my function has certain symmetries like swapping $y$ with square of any $z$, swapping any two of the zs, ...
0
votes
3answers
137 views
Better solution than returning a list of 3 values?
I have a function (using SetDelayed) that currently returns 3 values in a list. Later on I use the result of this list along with ...
12
votes
1answer
143 views
Is it possible to Clear all variables (but not functions)?
I have written a Mathematica script in which I define functions and variables. Here is a vastly simplified example:
...
