Advice for Mathematica as Mathematician's Aid
How can I evaluate untrusted Mathematica code in a sandbox?
Efficient lazy weak compositions
SeriesData sucks when it can. How do I keep SeriesData from sucking?
How to zero (or replace) the diagonal of a square matrix?
Splitting a list into increasing sublists
How to detect loops in a vector field?
Advice for Mathematica as Mathematician's Aid http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid
I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...
- asked by CarlEdman (29 votes), answered by MarcoB (20 votes)
How can I evaluate untrusted Mathematica code in a sandbox? Is there any way to build a sandbox to evaluate untrusted Mathematica expressions in order to prevent them from having (malicious or accidental) harmful side effects? Context: I'm developing a system ...
- asked by ibeatty (21 votes), answered by Stefan R (10 votes)
Efficient lazy weak compositions http://mathematica.stackexchange.com/questions/92647/efficient-lazy-weak-compositions
In Mathematica all weak k-compositions of integer n can be generated using permutations of integer partitions: ClearAll[weakCompositionsPermPart] weakCompositionsPermPart[n_Integer, ...
- asked by jkuczm (19 votes), answered by jkuczm (18 votes)
SeriesData sucks when it can. How do I keep SeriesData from sucking?
When I run Series[f[x]*Sin[x],{x,0,3}, Analytic->False] I get: f[x](x-x^3/3+O[x]^4) as expected. In FullForm, this is Times[f[x],SeriesData[x,0,List[1,0,Rational[-1,6]],1,4,1]] But ...
- asked by QuantumDot 16votes How to zero (or replace) the diagonal of a square matrix? Zeroing the diagonal of a square matrix is an operation I need frequently, but somehow I still haven't managed to find an elegant solution that satisfies all these requirements: works with both ...
- asked by Szabolcs (14 votes), answered by ciao (12 votes)
Splitting a list into increasing sublists http://mathematica.stackexchange.com/questions/92527/splitting-a-list-into-increasing-sublists
I have a list of numbers (say, for example, {1,2,3,4,3,2,1,2,3,4,3,2}), and I want to split it into sublists so that each sublist is the (smallest) sublist whose sum is larger than the preceding one. ...
- asked by rogerl (14 votes), answered by Chris Degnen (4 votes)
How to detect loops in a vector field? http://mathematica.stackexchange.com/questions/92425/how-to-detect-loops-in-a-vector-field
Given a vector field and I'd like to detect if there are streamlines in closed patterns. For example, if the input is a vector field like this: image = ColorConvert[Rasterize[\[Infinity], ImageSize ...
- asked by M.R. (14 votes), answered by nikie (19 votes)