43,859 reputation
567177
bio website
location
age
visits member for 2 years, 8 months
seen 3 hours ago

Feb
22
comment Extract coordinates from a polygon
It looks like your poly expression contains a list of length 2 at a higher level than the individual coordinate pairs that you are trying to reach with Cases. Try making the pattern inside Cases more specific, e.g. {_Real, _Real}
Feb
20
comment Behaviour of Simplify when used with ArcTan and ComplexExpand along with assumptions
The documentation states that "Assuming affects the default assumptions for all functions that have an Assumptions option." Since ComplexExpand does not have an Assumptions option, it does not use the assumptions you specified in Assuming
Feb
20
comment How to customize derivative behavior via upvalues?
@Tom, I had completely forgotten about NonConstants. That means you can use upvalues as you suggested. Update coming up.
Feb
19
comment Testing for arbitrary algebraic expression in given variable
If you restrict Cases to level {-1} then you don't need the AtomQ test. Also DeleteDuplicates followed by Sort is equivalent to Union.
Feb
19
comment Merge two Matrices without Duplicates
I think the left-over duplicates are deliberate. As I understand it the idea is to remove just the elements at the beginning of data2 which are at the end of data1, like stitching together multiple images to make a panorama.
Feb
19
comment Can this function be numerically integrated
Include values for the constants too.
Feb
18
comment Can Mathematica Operators be combined in a linear fashion for readability?
You should look at Through too, e.g. Through[(f + g + h)[x]] gives f[x] + g[x] + h[x].
Feb
18
comment Variable scoping in Module
Regarding the update: The difference is that with Rule the symbol a does not appear on the rhs, because the rhs is evaluated before Rule "sees it". So the rule is: {a_, b_} -> (3 -> b). Since the symbols a and b occur as pattern names in the lhs of this rule, they are indeed treated as local to the rule, but this localisation happens after the evaluation of the rhs. RuleDelayed has the HoldRest attribute, so the rhs doesn't get evaluated and the rule acts as you expect.
Feb
18
comment How to customize derivative behavior via upvalues?
You haven't defined any values for D[X[x] + Y[x], x] so Mathematica computes it as normal, giving X'[x] + Y'[x]. Note that the result is in terms of Derivative not D. I think you will be better off defining your custom derivatives as subvalues of Derivative, e.g. X'[_] := A; Y'[_] := B;
Feb
17
comment Default Chart Color Doesn't Match
@rm-rf, no I'm on version 9. Has this changed in v10 then?
Feb
14
comment Use Simplify option Trig->False when 3rd argument to Collect is Simplify
Either use SetOptions to change the default, or use Simplify[#, Trig -> False] & in the Collect
Feb
13
comment Highlight Pie in PieChart
@halmir, good idea to allow multiple highlighted sections, but I prefer Thread@{1, n, 2}
Feb
13
comment Default Chart Color Doesn't Match
@Mr.Wizard, rogerStyles appears (in v9) in the trace for multi-colour bar charts, e.g. Trace[BarChart[{{1,2,3}}], TraceInternal -> True] but not for single-colour charts (it looks like the light blue is hard coded)
Feb
12
comment Default Chart Color Doesn't Match
@bobthechemist, I found it a while ago, looking for the colours used by CommunityGraphPlot so that I could create a legend. I think I probably used Trace to track it down.
Feb
11
comment Get Coordinates 4 significant digits limitation
Strangely using CoordinatesToolOptions -> {"CopiedValueFunction" -> (# &)} gives 6 digits.
Feb
9
comment Using Assumptions with Solve
The documentation for Assuming states that "Assuming affects the default assumptions for all functions that have an Assumptions option." Since Solve does not have an Assumptions option it is not affected.
Feb
8
comment Find positions of items in a list based on neighbours
@Mr.Wizard, sorry I wasn't ignoring your request, I had to pop out. I can't find a duplicate either.
Feb
7
comment Analysis of many similar x-ray Images
Oops - circles have small eccentricity and rectangles large :-)
Feb
7
comment Capturing an F1
@SteveD, try using InputNotebook in place of EvaluationNotebook in those answers
Feb
7
comment Analysis of many similar x-ray Images
Related, this and this