58,519 reputation
18148273
bio website
location
age
visits member for 2 years, 3 months
seen Apr 8 at 20:34

Apr
8
comment FindRoot with units error: Message text not found
The implementation of units is very buggy... probably not the best choice of functionality if you want to extol the virtues of Mathematica :)
Apr
8
comment Connect to SQLite database
I'll also note (for those that might run into the same problem) that the connections need absolute paths, not relative paths. For instance, on OS X/Linux, a path like ~/foo/bar/qux.db won't work, while /Users/abc/foo/bar/qux.db will.
Apr
8
comment List comprehensions pythonic way
MapThread[#^2 + #2&, {q, m}]
Apr
7
comment Set-generating macro unexpectedly reaches recursion limit
I agree with @LeonidShifrin. Also see this relevant discussion: mathematica.stackexchange.com/q/1162/5 (possibly even a duplicate)
Apr
7
comment Nested for loop in mathematica
I suggest reading this question, especially the answer about avoiding loops. Also, while the ability to use subscripts might seem "cool" (since most other languages don't allow it), they are evil (explaining why might be too much at this point). Try to avoid them in code at all costs :)
Apr
6
comment Padding sub-lists in a list
@annieheart Are you sure? It works for me.
Apr
6
comment Padding sub-lists in a list
Or PadLeft[Alist]. You got lucky and snuck that in after the close :)
Apr
6
comment Padding sub-lists in a list
Hello annie, the function you're looking for is PadLeft and the solution is simply PadLeft[Alist]. Such questions that are answered directly by the documentation are often closed as "easily found in the documentation", but don't take that personally :)
Apr
4
comment Index-based Array splitting
Thanks @Artes :)
Apr
4
comment How to prepare (copy/paste) data from Matlab?
@Phab Ok, then please write to matlink.m@gmail.com or support@matlink.org for a possible solution.
Apr
4
comment How to prepare (copy/paste) data from Matlab?
@Phab What's your operating system?
Apr
4
comment How to prepare (copy/paste) data from Matlab?
Related/duplicate: mathematica.stackexchange.com/q/10231/5
Apr
3
comment How to fix this memory leak
@LeonidShifrin No problem :) Also, thanks for noticing the issue with the attributes. I paid no attention to the original code! :D
Apr
3
comment How to fix this memory leak
@LeonidShifrin Thanks, I've changed it, but why do you say it won't work (it worked in my test)? Isn't the Temporary attribute only necessary for automatic garbage collection? If I force erase all definitions, is it not the same?
Apr
3
comment Accessing list elements by name
@DavidCarraher With Dispatch, it comes very close to Association's timings. However, I like the cleanliness of using Association, especially with how the code reads. See also this answer and Leonid's comments under it for the advantages of Association.
Apr
3
comment Caching RecursionLimit::reclim error
The number is approximately 1024 ($RecursionLimit) + 100 (your condition on a). Change the condition and the number will change along with it.
Apr
2
comment Defining conditional Notation rules
@LeonidShifrin No problem! I'll take care of the crumbs here and there to free you some time to finish that book of yours ;)
Apr
2
comment Defining conditional Notation rules
Leonid, I get your answer but I think the cause for confusion is because @DanielMahler is probably using the 2D subscript notation whereas makeExpression handles the fullform. Daniel, could you change the definition of sub to ClearAll[sub]; sub[f_] := With[{boxed = MakeBoxes[f]}, makeExpression[SubscriptBox[boxed, arg_], form_] := MakeExpression[RowBox[{boxed, "[", arg, "]"}], form]]; and see if it does what you want?
Apr
1
comment Display a labeled multigraph
Related: mathematica.stackexchange.com/q/6282/5
Apr
1
comment What is the mathematical meaning behind D[f]?
That's a very good and compelling reasoning for the output it provides... In my earlier comment, I didn't say undefined syntax, but invalid syntax (I can see how "invalid" is incorrect terminology as well... I should've said "undocumented"). I would consider this to either be a documentation oversight (if this use is intended) or speculative... the definition might as well be D[f_] := f as I had said in my comment :)