61,813 reputation
18170295
bio website
location California, USA
age
visits member for 2 years, 9 months
seen 33 mins ago

Feb
19
comment Simplify Sin[x]/x to Sinc[x]
There are plenty of examples on this site for TransformationFunctions and ComplexityFunction... Also search for LeafCount both in the docs and this site and also see this question
Feb
19
comment Dynamically splitting Disks with Mouseover
A related question: "What's the fixed point of overlap for the parent and all child disks, so that I can just keep my mouse at one point and keep clicking?" :D #lazy
Feb
19
revised Dynamically splitting Disks with Mouseover
edited title
Feb
19
revised How to Initiate a queued evaluation from a Dynamic GUI without using a Button
added 10 characters in body; edited tags; edited title
Feb
19
comment Multiple templates for a single user-defined function
@QuantumDot Yes it works, but only if it was defined that way initially. If you want to add a new definition, it looks like you'll have to Remove the symbol first (ClearAll doesn't suffice, even though the message definitions are cleared). My guess is that since the template completion is handled by the FrontEnd, it loads this when the function is first defined and remembers it forever and is unaware of later changes to the symbol in the kernel.
Feb
19
reviewed Reviewed Strange behaviour of OutputResponse
Feb
19
reviewed No Action Needed What are the most common pitfalls awaiting new users?
Feb
19
answered Multiple templates for a single user-defined function
Feb
18
reviewed Leave Open Complex line integral
Feb
18
comment Speed up 4D matrix/array generation
@whuber For the OP's lim/step of 25, it is slightly faster — ~1.1 s for naïve Table vs. ~0.8 s with mine. However, when you increase the dimensions to lim/step = 50, it is much faster — ~285 s for Table vs ~13.8 s for mine. Although the OP uses Sinc, which is not a computationally expensive function, I can imagine this approach providing a much bigger speed gain when the function f is expensive. I didn't test either approach with parallelization, since I don't have free kernels right now.
Feb
18
answered Speed up 4D matrix/array generation
Feb
18
comment Speed up 4D matrix/array generation
Are a, b, c, d all in the range { -lim/step, lim/step, 1}?
Feb
17
comment How to get complement from two matrices?
@PlatoManiac I think that would be useful. Your complement solution is neat and intuitive and it would be worth noting in your answer that it is a nice way to do it if the rows have distinct elements, but also provide a generalized solution.
Feb
17
comment How to get complement from two matrices?
@PlatoManiac Doesn't it just mean that a Complement based solution was not a general solution to the general problem posed in the previous question? Maybe something like ConstantArray[0,10] /. {h___,0,t___} :> {h,t} would work.
Feb
17
comment How to transform this matrix & swap its columns in a simple way?
@jrojasqu change the list inside the diagonal matrix to (-1)^Range@Length@A
Feb
16
revised Patternmatching sets
deleted 115 characters in body
Feb
16
answered Patternmatching sets
Feb
16
comment Badly conditioned matrix (General::luc)
You can use LinearAlgebra`MatrixConditionNumber to find the condition number of your matrix. What value you choose as the threshold depends on your particular application... In general, a condition number that is $\mathcal{O}(10^n)$ can make you lose up to $n$ digits of accuracy (in addition to FP errors).
Feb
16
comment What Mathematica book to buy?
2 of the three you listed were already mentioned in other answers. Please make sure that suggestions are not being duplicated. As for the remaining one, please explain why you recommend it, as that is what will help future visitors make an informed decision.
Feb
16
revised Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?
deleted 3291 characters in body