The code-review tag has no wiki summary.
2
votes
1answer
107 views
EmpiricalDistribution for Gini Coefficient Runs Slow
I am repurposing code that I found in this blog post (http://datavoreconsulting.com/sports/gini-coefficients-and-the-olympic-medal-race/) to generate the Gini coefficient for other data sets I am ...
2
votes
1answer
45 views
Unique[] in RHS of rule
I have a function, explicit that takes dot product of two symbols, and replaces it with repeated dummy indices generated by ...
4
votes
1answer
78 views
Copying a symbol using a subpackage
In this question, there is a beautiful method to copy a symbol. However, i'm not able to use it as an addon to my package. So the main question is
How to rename/copy a function defined in a ...
13
votes
1answer
175 views
Copying one symbol into another
I would like to know how can I completely copy one Symbol to another. When I say copy, a refer to UpValues, DownValues, ...
7
votes
2answers
225 views
Feedback on Functional Programming: Propagation of uncertainty
Lately I've been trying to use functional prgramming and tried to implement the gaussian propagation of uncertainty (without correlation) in an elegant way, here is the outcome:
...
19
votes
1answer
284 views
Strategies for solving problems involving searches
As an example of a search-oriented problem, consider finding all constrained $n$-colorings of a graph. An "$n$-coloring" associates one of $n \ge 1$ colors to each vertex in such a way that no edge ...
2
votes
3answers
241 views
Using DSolve to solve for x[t,parameter]
I'm trying to solve an ODE with two independent variables (a cannon firing from a cliff incorporating wind resistance dependent on velocity). I've tried the following for the x-component:
...
6
votes
2answers
309 views
Elegant way to handle columns operations
Inspired by this question from @sjdh and by my recurrent use of columns operations in database sets, I was looking for one way to make columns operations more symetric, so I can handle with matrix and ...
0
votes
1answer
222 views
3
votes
1answer
121 views
Feedback on my Subscript code
I have written a code, and I need a little feed back..
I want to make the Subscript distributive across (1) addition and (2) multiplication to mimic short-hand for ...
0
votes
1answer
101 views
Some Problem with WhenEvent!
Anyone knows what's the problem with the following code and how can I fix it? I am not sure that I wrote the WhenEvent section correctly.
By the way, I want to solve the equations and then plot y vs. ...
1
vote
1answer
199 views
3 hour calculation? ParallelMap & ParallelTable
I'm having some problems with slow Mathematica code... I'm basically doing a computation that's is expected to take 3 hours (!) in my Core i7 with 4 processors... I'm basically computing an index (of ...
2
votes
1answer
84 views
How to override `?NumericQ`
I have a function myFunc which I is to be displayed cleanly if arguments are symbolic, but which can also be numerically evaluated. I do this by defining a ...
3
votes
3answers
400 views
Speed optimization
I have a part of a program that I have to repeatedly call many times (about 2000 to 10000 times)
...
2
votes
2answers
308 views
How to fix BodePlot that comes with Mathematica?
I am using Mathematica to go through the examples and exercises on the book Modern Control Systems by Dorf, 6h edition. On page 605, there is a table (Table 8.5) with the Bode plot for several ...