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.
2
votes
1answer
98 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
1answer
55 views
-1
votes
1answer
186 views
Multivariate Function Approximation With a Large Dataset
I have a nice amount of data from a trading strategy I am working on, where I have two different liquidity parameters as x, y variables.
Before entering a trade I am taking the moving average of ...
10
votes
0answers
131 views
func::usage needs to be run twice?
There is an annoying problem that I can't figure out why it's happening. I have defined a usage for a my function tensorA:
...
5
votes
0answers
64 views
Is there a function to generate a minimal clique cover?
This is a graph problem known as the "Clique Edge Cover" or "Intersection Number" problem, and the goal is to find, from a given graph like $E=\{\{a,b\},\{a,c\},\{b,c\},\{b,d\},\{c,d\}\}$ and ...
2
votes
0answers
66 views
correct usage of ParallelTable
I am trying to parallelize my script. Here is a MWE of how I have done it:
...
2
votes
0answers
62 views
From notebook,how can I change variable value with in .m file dynamically?
I wrote a function named Testing.
...
2
votes
0answers
76 views
How can this function's options be used in different places?
I wrote this function to make a ListPlot where the points are colored by a third argument.
...
2
votes
0answers
201 views
Generating a function which outputs possible chemical reactions
I want to make a list of chemical reactions and I write them down in a $\require{mhchem}\LaTeX$ format. They are of the following form
$$NA_n^i+MB_m^j \rightarrow \hat NA_{\hat n}^{\hat i}+\hat ...
1
vote
0answers
60 views
How can I compile function with Apply?
For example, I tried to compile this function but Mathematica gives "The only function arguments supported are Times, Plus, or List", I have no a way to compile this.
...
1
vote
0answers
73 views
How can I obtain the function described by given set of central moments?
I want to investigate how my function P behaves with different probability functions rho as input variables.
This means
...
1
vote
0answers
103 views
Return Functions from parallel execution of module
I wrote a module which numerically solves an ODE using NDSolve. The result from this is e.g. either ...
0
votes
0answers
55 views
Finding coefficients that make certain functional expression vanishing
My problem is to find a procedure that gives coefficients which make certain functional expression vanishing.
For example if I have a polynomial $P(x)$ of one variable $x$ given by $P(x)=a_0+a_1 ...
0
votes
0answers
89 views