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.

learn more… | top users | synonyms

-1
votes
1answer
170 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
126 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: ...
2
votes
0answers
60 views
2
votes
0answers
70 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
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, ...
2
votes
0answers
194 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
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
97 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
44 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
88 views

Bad function evaluation

I am having some trouble with this function ...