Reputation
69,898
Next tag badge:
1551/1000 score
197/200 answers
Badges
3 122 277
Newest
 Enlightened
Impact
~1.1m people reached

Mar
31
comment I need to multiply a series of matrices
@Lukas I agree that some more experimentation is needed to find the optimal partition. You suggestion using $ProcessorCount sounds like a good guess - and I can't think of anything better if you can't hard-code the approximate dimensions.
Mar
30
comment Animations in 5.2
I added small corrections to make it run correctly (Circle apparently doesn't use defaults in version 5.2).
Mar
30
comment NDSolve and matrix formulation do not produce the same result. Why and which is more precise?
@Dr.belisarius this will fix the problem (see bottom of page).
Mar
30
comment How to plot a given function over its domain
@SofiaPazJimenezCastillo Don't forget to accept one of the answers by clicking the check mark.
Mar
29
comment How to force evaluation inside the body of a pure function?
It's trivial in this case (not to mention there is a built-in function Rescale): ScaleTo[data_, range_] := (data - Min[data]) (Last[range] - First[range])/(Max[data] - Min[data]). So you don't need a pure function at all.
Mar
29
comment Strange behaviour of integrals with Cos, Sin, and Exp
I agree it's a bug. But how to make a question out if this? I tried substitution of variables, introducing another parameter, but couldn't find a workaround using Integrate, unfortunately.
Mar
28
comment How to generate a graph from a tetrahedral lattice
@AlexisC Don't forget to click the check mark if you wish to accept this answer.
Mar
27
comment Plotting a vector function composed of piecewise scalar functions
It does look like a bug to me. I also get the same failure with VectorPlot... and it can also be fixed without using ?NumericQ as I note in the edited answer. Strange.
Mar
25
comment Does it mean that there no analytical solution if Mathematica cannot find analytical solution?
@MichaelSeifert indeed, I still had a copying error in there. I've just copied the whole thing one more time now... and of course I found only an instance of a solution, since the question was asking about solvability only. But the approach by march is the best in any case. Mine was just a quick response to show it can be done.
Mar
25
comment Does it mean that there no analytical solution if Mathematica cannot find analytical solution?
@KevinKim the replacement y -> (-x[#] &) sets the function y equal to the function -x. You can't just use y -> -x here because that won't work in the derivative. Hence the more complex notation. & declares an (anonymous) function and # is the variable placeholder.
Mar
25
comment Does it mean that there no analytical solution if Mathematica cannot find analytical solution?
@MichaelSeifert oh yes, of course I used the corrected version to get the posted result - just copied the OP's error accidentally.
Mar
25
comment Replacing negative components of a matrix with zeros
@Xavier Why not make it an answer? It's an amusing but also illuminating method...
Mar
25
comment Why is the range from $-\pi$ to $\pi$ in polar coordinates?
@J.M. I guess that's mathematically the right answer, but again CoordinatesFromCartesian does the "right thing" by giving $\phi=0$ without complaint. I think that was more useful.
Mar
24
comment Why is the range from $-\pi$ to $\pi$ in polar coordinates?
@J.M. Except for ArcTan[0,0]...
Mar
24
comment Why is the range from $-\pi$ to $\pi$ in polar coordinates?
@SimonWoods Definitely a valid criterion. But in version 8, the old CoordinatesToCartesian did not have that property wrt. CoordinatesFromCartesian (i.e., all angle inputs were allowed), so it's also possible that this is just a consequence of some excessive internal streamlining where FromPolarCoordinates hands off the computation to a more general function that's unaware of the cyclic property of some coordinates... just guessing. In any case, I would then expect maybe just a warning message but it should still work for all angles.
Mar
24
comment How to generate a graph from a tetrahedral lattice
If you know some of the pieces, then you'll have to provide the code for those pieces and be more specific about what stumbling blocks you encountered in putting them together. Writing it all from scratch for you is not usually the type of thing for which this site is intended.
Mar
23
comment How to get a C4-symmetric (coincides after 90° rotation) matrix via `ImageData` from `Graphics`?
I'm on Mac OS X and don't see the issue, but maybe you can try adding BaseStyle -> {Antialiasing -> False} to Graphics. See if that increases the symmetry.
Mar
23
comment Frontend flickering
You shouldn't add the bugs tag until someone else explicitly reproduces the behavior. For that, it will be important to provide copyable code to reproduce the phenomenon. If it can't be reproduced, then it will be closed. If it's a case where only Wolfram can help and no workaround exists, it will most likely also be closed, but it's too early to say...
Mar
23
comment Frontend flickering
Is this version 10.4? What OS? Looks like a case for Wolfram support.
Mar
22
comment How to use BezierCurve or BSplineCurve to define a quarter of a circle?
Also worth pointing out a bug that still exists in version 10.3: Where is the other half of my fourth degree Bézier curve?