18,885 reputation
32578
bio website
location
age
visits member for 1 year, 2 months
seen 5 hours ago
stats profile views 1,242

16h
answered Embed Code Into Image
1d
comment Having used Mathematica as a “gateway” language, where to from here?
Oh I didn't mean to imply that geordie would dislike C, just that having Mathematica as a first language it must be easy to underestimate just how much low-level stuff is going on behind the scenes. It sounds like I should be adding Javascript to the list of "languages I would like to learn but never seem to find the time to do so". (Currently Python is at the top of that list, Julia looks interesting too)
1d
comment Having used Mathematica as a “gateway” language, where to from here?
I'd suggest C too, for the reasons you've stated. If nothing else, it will give geordie a new appreciation of Mathematica :-)
2d
comment Why is there no PositionFunction in Mathematica?
@Mr.Wizard, good point, I didn't consider held expressions. I suppose one could, with sufficient code gymnastics, work with held expressions in MapIndexed - but then why bother when you've already shown how to do it neatly with Position and Extract. Great question, by the way.
2d
comment Doing vector manipulations on Mathematica
Yes indeed. Symbolic pattern matching and replacement is the heart and soul of Mathematica. Remember though that q and k are just symbols - Mathematica doesn't know that you are using them to represent vectors. Hence why you will have to define specific transformation rules such as the one you suggest. Or take a look at the symbolic tensor stuff (it's not available in my version (8) so I don't know what the capabilities are)
2d
comment Are there any functions that can determine the disorder between two lists?
In general, have a look here and here
2d
answered Why is there no PositionFunction in Mathematica?
May
21
reviewed Approve suggested edit on Filtering the elements of an array to split them into two categories
May
21
answered non-linear trend reduction using thresholds
May
21
awarded  Revival
May
20
answered Weird resampling when I try to export an Image
May
20
answered Problem with extracting specific contour from a ContourPlot
May
20
comment Different behaviours of Default Argument
@AlexeyPopkov, I don't think it's a bug. HoldPattern prevents evaluation of the pattern (compare Unevaluated[Print[a + b]] /. HoldPattern@Print[y_ + x_] :> p[x, y] with and without the HoldPattern) but I don't believe it is intended to prevent the pattern matcher from respecting the Orderless attribute. Remember that ReplaceAll is just using the first of potentially multiple ways to match the pattern. If you use ReplaceList instead of ReplaceAll in the examples, the results don't seem so odd.
May
20
comment Does Graphics`Mesh`SimplePolygonQ[] work for you?
It would be worth checking if version 7 has Graphics`Mesh`IntersectQ
May
19
comment Doing vector manipulations on Mathematica
@user6818, my code just converts expressions like Norm[-a] and Norm[-a + b] into Norm[a] and Norm[a - b]. You could add more rules if there are other transformations you need.
May
19
comment Doing vector manipulations on Mathematica
@user6818, yes - the dot at the end of y_. tells Mathematica to use the default value for Plus (which is zero) if there isn't anything there to explicitly match the pattern. Look up Default in the documentation for a fuller explanation.
May
19
comment Problem with extracting specific contour from a ContourPlot
The correct syntax is PlotRange -> All (no list). For the missing areas, you just need to increase PlotPoints. Try PlotPoints -> 200 in the second plot.
May
19
answered Doing vector manipulations on Mathematica
May
19
awarded  Nice Answer
May
18
comment Doing vector manipulations on Mathematica
Perhaps you are looking for Expand instead of FullSimplify ?