Questions on writing non-trivial programs in Mathematica. Do not use this tag for questions on plotting/graphics or for questions on doing mathematics with Mathematica, where the focus is more on the math than the program.
6
votes
0answers
217 views
Is it possible to construct a function to make a poor man's Mathematica database?
I have a function that is set up to write to a database with 10-20 standard variables with 10 fields each, but the application is going to a place where database access is not available. Can ...
6
votes
0answers
227 views
MMA implementation of Earth Movers Distance?
Has anyone implemented in MMA the Earth Mover's Distance (EMD)? A concept dating back to Monge 1871, used to compare histograms and images, e.g., the CIEDE2000 Color Difference algorithm. Yossi ...
5
votes
0answers
71 views
Convert logical relational expression to / from disjunctive and conjunctive forms?
I would like to convert logical relational expressions in disjunctive form, e.g.,
$$(x \lt -1) \lor (-1 \lt x \lt +1) \lor (x \gt +1)$$
into conjunctive form, e.g.,
$$(x \ne -1) \land (x \ne +1)$$
...
4
votes
0answers
79 views
What is the fastest way to maintain a large set of expressions?
In my algorithm I need to maintain a set (an unordered list of distinct elements) of expressions supporting two operations:
Test an expression for membership in the set
Adding a new expression to ...
4
votes
0answers
55 views
Is there a way to check whether two notebooks share the same variables?
When I code in Mathematica, I often re-use code from old notebooks which fulfilled a specific purpose; for example, one testing for soft matches in strings, or one that identifies outliers on a graph ...
3
votes
0answers
186 views
Running a Mathematica program without Mathematica
I want to create a program in Mathematica that can run without using Mathematica. Is it possible and how should I do it?
2
votes
0answers
103 views
I am missing a function like HoldPattern
Temporary message: I am planning to edit this question, making the examples less confusing and by moving the things that are confusing to a separate question
For any confusion about expressions that ...
2
votes
0answers
120 views
1
vote
0answers
103 views
Why doesn't ParallelMap improve the performance of FoldList?
This question arose during my analysis of the following problem: filling gaps. (The code used here is Simon Woods's work.)
FoldList seems to not cooperate with ...
1
vote
0answers
145 views
Forecasting future Stock Prices II
I intend to do the following: I want to forecast future stock price under the following assumptions: The stock price is governed by the stochastic differential equation:
dS = μSdt + σSdWt
whereas ...
1
vote
0answers
135 views
Data structure for a list of actions
The idea: I need to generate a sequence of events then run a "propagator" over the list of events where the "propagator" will update the state of the following event. I can then write functions that ...
1
vote
0answers
87 views
Search & Replace Other Languages
Mathematica allows you to pattern match based on type and operate on itself because of it's list nature.
For example:
a[b] /. a -> d returns ...
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 ...
1
vote
0answers
121 views
Fighting Less::nord at the root: Any unintended consequences?
After being plagued too much by Less::nord and companions, I've decided to try to fight it at the root: The comparison operators. I noticed that typically, the bad ...
0
votes
0answers
96 views
Mathematica TCP socket client toward Trading Platform
I'd like to connect Mathematica with my Italian electronic trading platform.
To connect I need to open a TCP socket client towards the trading platform and send a string command.
The high-level ...
0
votes
0answers
47 views
How can I import sound from within a Manipulate expression?
I want to import sound from a file, record, and import sound.
...
0
votes
0answers
64 views
0
votes
0answers
120 views
Diffusion equation with concentration dependent diffusivity, NDSolve has problem at C0> 10^20
I am using NDSolve to solve the diffusion equation:
D[Cp[x, t], t] == D[Dc D[Cp[x, t], x], x]
where Dc is a function of ...
