whuber
Reputation
17,526
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
 Mar 23 comment Constructing an Equilateral Triangle Inscribed Inside a Circle Without making extensive guesses, it's impossible to determine what you're really asking. What would your input be? Centers and radii of the circles? The points A ... F? Something else? What, if anything, are you assuming about the shape of the triangle or the relative sizes and positions of the circles? Mar 16 comment Estimate error on slope of linear regression given data with associated uncertainty I posted a solution to the problem of errors in both $x$ and $y$ at stats.stackexchange.com/a/201915/919 . Although it is illustrated with R code, it is readily implemented in Mathematica. I believe it may be the same as the algorithm posted in this thread by J.M., but with some modifications to make it more robust and broadly applicable. In particular, (1) it provides a good starting value for the parameters (by finding an Ordinary Least Squares solution) and (2) it uses the angle of the fitted line rather than its slope as one of the parameters. Jan 25 comment NMinimize usage @Bruce I don't know. I would guess that would have little effect on the frequency of constraint violation, though. Aug 9 comment Any solution to system of equations? It all depends on what you might recognize as being "similar," @Jerry. At the outset this answer announces the problem is special--it's a little hard to characterize it. The "standard approach" I describe is a systematic way to solve a system involving an inequality by means of optimizing a function. As always, YMMV. Dec 20 comment Inverse of function including hyperbolic cotangent Could you elaborate on what you mean by "create a numeric function"? Consider, for instance, the command Plot[InverseFunction[Coth[#] - 1/# &][y], {y, 0, 1}]: would that constitute an acceptable solution? Jul 29 comment Clustering of space-time data @s.s.o I found copies of the files on a backup drive and have shared them on Dropbox. Jul 10 comment Representing a Stencil of a Finite Difference Operator with Mathematica's Graphics3D @rubenvb Thank you: I see what you mean. There are arbitrary elements to that diagram--it could be drawn in many equivalent ways. However, something like it could be implemented in Mathematica, provided we settle on rules to determine which sets of line segments to draw. Jul 10 comment Representing a Stencil of a Finite Difference Operator with Mathematica's Graphics3D @rubenvb That's a great idea. How would you implement it? In this diagram, renderings of such connections would all run into one another. I can think of some possibilities, such as introducing a light 3D grid, or a set of nested transparent cubes, or other such visual references, but perhaps you have a specific form of visualization in mind? Apr 30 comment Generating convex polyhedron from face planes? @level1807 Good catch! Although I haven't tested it, it looks like a bug to me--evidently from a typographical error. The intention was to to compare the chopped values to zero, not to chop the results of a floating point comparison (which makes little sense anyway). I will go ahead and modify the code in this answer. Thanks again. Apr 30 comment Generating convex polyhedron from face planes? @level1807 I cannot say: as you can see from my example, I had no trouble with $50$ faces. The possible explanations for what you are encountering could range from differences among MMA versions through floating-point errors through some kind of bug in my code. It could be related to the limitations described in the introduction to this answer. If you want to resolve this you will need to find as simple as possible an example that can be reproduced and then offer it in a new question. Good luck! Feb 6 comment Plot a 2D vector path onto a surface @rm-rf Thank you for the tip and the kind words. I am over-extended moderating two other SE sites. Although both have elected two more moderators in the interim, the work is still too much. I hope to return here at some point. Jan 16 comment How to check if a 3D point is in a planar polygon? @Rainer Assuming the points are very close to coplanar, the smallest eigenvalue will be close to zero and much smaller than the other two. The eigenvectors associated with the other eigenvalues--that is, the first two principal components--thereby span a plane passing close to most of the points. This gives two solutions: (1) The cross product of the first two principal components will be a normal vector for that plane. (2) The third principal component will be orthogonal to the other two, whence it too is a normal vector for the plane. Nov 7 comment NMinimize usage @Frederik You are right: I made that typo early on and because everything worked, I did not catch it. Your suggestion $x = 1+y^2$ accomplishes what was intended and everything goes through as planned. Thank you for reading this post so carefully and well! Oct 24 comment Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$ @xzczd Thank you! That is a useful insight and looks to be a likely explanation for the failure. May 24 comment AstronomicalData and Planetary Heliocentric (x,y,z) Velocity Components +1 Consider a central difference instead: it should be more accurate. It makes a substantial difference, by the way: it affects the third sig. fig. in your example, because it reflects the net planetary acceleration during the course of 12 hours. May 24 comment How to calculate the volume of a convex hull? That doesn't quite seem to be a duplicate, @andre, because there the data are given in a different form. In principle there should be a formula for computing the volume in terms of a suitable integrals over the curve. May 23 comment Finding integral points on a surface The equation is a cubic (parameterized by $n$), so it's possible a more efficient method to obtain all solutions can be found by computing generators of its group of integral points. But typically these groups are so small--I haven't found one larger than $12$ yet--as a practical matter it might not be worth the effort. May 23 comment Finding integral points on a surface You're welcome. You shouldn't be so quick to accept this answer, though: this community does a great job of improving answers over the course of a day or two. Much better answers might appear soon :-). May 22 comment CorrelationTest small bug? It seems to me they are testing the same hypotheses but are using different approximations to the sampling distribution of the test statistic. May 22 comment Composition: how to make a day and night world map? This question also has an answer (using MMA illustrations) on the GIS site.