38,099 reputation
554156
bio website
location
age
visits member for 2 years, 4 months
seen 5 hours ago

Jun
6
comment Can I change Legend text in a stylesheet?
For me the TemplateBox tag is a string, so I tried creating a named style for LineLegend. It turns out the legend will pick up the font size, weight and colour from the stylesheet but not the font family. Looking at the boxes, the Times font is explicitly specified in a StyleBox which overrides the style from the stylesheet :-( So I think you are right, I will have to set the LabelStyle option in the kernel.
Jun
4
comment Finding all sets of elements with two common elements in a large dataset
+1 Nice use of tags in Sow
Jun
4
comment Making a Mathematica package manager?
It might be better to follow halirutan's lead and make this a self-answered question (Q. Can we create a package manager? A. Yes we can...) with an associated chat room for discussions. As currently posed it's not clear what would constitute a "correct" answer and it risks being closed as primarily opinion based.
Jun
2
comment Partial zeta curlicues
You could use something like data = Transpose@{Re@#, Im@#} &@ Accumulate[Range[3000]^-(0.5 + 10000 I)]; to calculate the data
May
29
comment How do I save the values in a table?
If you want to create a table, don't use For. Use a function that creates a table, such as Table.
May
28
comment How can I speed up this code with multiple sum?
@user14634, I added some explanation.
May
27
comment Exhaustive examples of variable replacement due to nested scoping constructs
How about TagSet and UpSet
May
26
comment Generating $n$ random samples every time
+1 This must be the most efficient approach I think. You could write the output more succinctly as Differences@Join[{0}, slices, {n}]
May
26
comment Generating $n$ random samples every time
So you are trying to create a list of n random integers such that Total[list]==100 and Min[list]==1 ?
May
26
comment Generating $n$ random samples every time
This is very unclear. There is no $n$ in your code.
May
26
comment Unexpected results from Thread
Thread evaluates its argument. To get a result analogous to the one with f you need to wrap the argument with Unevaluated: Thread[Unevaluated[g[{{1, 1}, {2, 2}, {3, 3}}, {4, 5, 6}]]]
May
25
comment High-quality RegionPlot3D for logical combinations of predicates
@RahulNarain, I think they should be equivalent, and I agree it's clearer that way.
May
25
comment High-quality RegionPlot3D for logical combinations of predicates
@RahulNarain, thanks. I added a few words about how it works.
May
25
comment Reversing Autocorrect, aka how to find the word that was supposed to be there
Isn't this more of an autocorrect than an inverse autocorrect? If the message writer attempted to type "snort" but wrote "inort" and this was corrected to "inert", the problem is to get from "inert" to "snort".
May
24
comment High-quality RegionPlot3D for logical combinations of predicates
Nice idea. Not really thought this through, but if you use f = BooleanConvert[LogicalExpand[#], "ESOP"] & to convert the predicate to an exclusive sum of products, I think you should split the region into distinct parts which you can use your code on. e.g. Show @@ (myRegionPlot3D[#, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}] & /@ f[1/4 <= x^2 + y^2 + z^2 <= 1 && (x <= 0 || y >= 0)])
May
24
comment Evaluation of m.v is blocked by applying MatrixForm. Why?
The documentation for MatrixForm is unfortunately a bit misleading. The statement that it "..."acts as a "wrapper", which affects printing, but not evaluation" implies that it is somehow transparent to the evaluator. As you have found, this is not actually the case. Like Subscript, MatrixForm is something you should reserve for pretty output formatting, but keep out of the internals of your code.
May
22
comment Simplifying Fourier transform of a complicated function
The OP is doing a symbolic Fourier transform with FourierTransform. CUDAFourier does a discrete numerical transform like Fourier.
May
21
comment Extract a list of all built-in functions used in a notebook
@Öskå, from Leonid I would expect 2 pages of code which would not only find the functions but also automatically write the documentation for you :-)
May
21
comment Extract a list of all built-in functions used in a notebook
@LaraJordan, ah okay. I only tested it with the simple example in the question.
May
21
comment Extract a list of all built-in functions used in a notebook
Nice. I forgot about Cells...