5,406 reputation
11130
bio website
location
age
visits member for 1 year, 10 months
seen 11 hours ago

Mar
8
comment Cropping a Plot without rasterization
Just using PlotRange is no option? Like: Plot[x^2, {x, -1, 1}, Frame -> True, PlotRange -> {{-1, 0.5}, Automatic}]
Mar
5
comment Extracting function calls from an expression
@PlaysDice: based on the example he gave I figured that the identifying pattern of the items to select is the head F. Thus my solution. But you are right, assuming he doesn't nest, it will work just as well.
Mar
5
comment Slow evaluation of complicated Table
I suggest also reading this one here: mathematica.stackexchange.com/questions/2639/…
Mar
5
comment Extracting function calls from an expression
@PlaysDice: well, assuming you want to retrieve the functions on the second but last level (and thus: not nested like func1[0,func2[1]]), you could e.g. use Cases[expr, _, {-2}]. Is that what you are looking for?
Mar
4
comment Extracting function calls from an expression
@PlaysDice: well, as long as you can make a pattern, it should work. Is there a concrete example you have in mind? (I would suggest not using capitals for that, as many of them are reserved (such as E, C, D,...)
Mar
4
comment Extracting function calls from an expression
I am glad you like it & I am kinda proud you take that as a start learning more about MMA (or whatever that language is called these days)! Don't accept to hastily, there might be other (maybe even nicer ways) to get what you like, you don't want to scare them away, do you? :) (and try to be active in here, that's how I learnt a lot!)
Jan
30
comment More elegant/efficient solution to browse through an array
sure, just kidding - one can only guess what he wants, at this point
Jan
30
comment More elegant/efficient solution to browse through an array
or ArrayPlot[array, ColorFunction -> "Rainbow"] for the more visual people out there :)
Jan
27
comment Evaluate function from a table
it has no way of knowing that the function is in x. Afaik, you have to either use Composition or else Replace (a.k.a. /.), as shown above. Sorry don't have the time to write full answer.
Jan
27
comment Evaluate function from a table
Not sure I understand (also looking at @bills answer). I try: either explicitly compose like for any "normal function", like ff = #^2 & and then ff[ff[x]] respectively: g=ff[ff[#]]& or use Composition explicitly
Jan
27
comment Evaluate function from a table
try: f[[1]] = #^2 &(you need a pure function for that, see documentation). Also: check out: ConstantArray[0, 4]:) (fwiw: alternatively: f[[1]] /. x -> 2, but I wouldnt recommend that)
Jan
21
comment How to place a matrix under controls (sliders) in a Manipulate?
not sure if I understand: if you use the following in place of your controls, is that what you want? Column[{Control@{{a, 1, "x-Richtung"}, -3, 3}, Control@{{b, 1, "y-Richtung"}, -3, 3}, Control@{{c, 1, "z-Richtung"}, -3, 3}, Dynamic@Style[{{a, 0, 0}, {0, b, 0}, {0, 0, c}} // MatrixForm, FontSize -> 18, FontColor -> Black, TextAlignment -> Left]}]
Jan
21
comment neighbor swapping distance between two strings
I think EditDistance is a bad choice here, for "EditDistance treats transposition as separate deletion and insertion operations", so: EditDistance["ac", "ca"] yields 2, whereas: "Damerau-Levenshtein distance counts transposition as a single operation" (yields 1)
Jan
1
comment how to calculate with just double floating point precision
you might want to use Chop (use 2nd argument to specify tolerance).
Dec
20
comment How can I find the sum of the even digits of a number of all elements of a list?
yes, here I have Dot>Mine>Boole>Trapproach in timings, for n=10^6
Dec
20
comment How can I find the sum of the even digits of a number of all elements of a list?
nice one - I tried to keep it readable up to some point, as I currently have no time to comment really :) but I like Dot there!
Dec
12
comment how to deal with so many digits in plot ticks
@Kuba: thanks for the flowers :) I've recently been so inactive, I even forgot the answers I posted myself... good thing you are more active and have the overview of the community!
Dec
11
comment How to plot contours in the faces of a cube
this might be of interest: mathematica.stackexchange.com/questions/26749/…
Nov
28
comment How to convert long integers in the expression into the products of their prime factors via Mathematica?
ah ok, I wasn't aware of that syntax, my bad. You could modify fact accordingly. Let me know if you need any help & thanks for the feedback
Nov
28
comment How to convert long integers in the expression into the products of their prime factors via Mathematica?
@LCFactorization: please define what you'd like to obtain in the final step (this is not fully clear to me). Thanks