|
Prev: a question about angle in solve
Next: Bloated files when saving large variables to .mat files with -append
From: Bruno Luong on 6 May 2008 08:39 Quite interesting problem. I'm not so sure as John that the solution does not exist. If you suppose probability distribution of R=(x1,x2) depends only on |R| (thus in your case the points are distributed on a disk rather than on a rectangle), the pdf f(r) of |R| must verifies some integral equation that I believe there exists a solution. The integral equation get quit messy with the border, and I'm too lazy to write it out. If someone is willing to tackle, feel free to do so. Bruno
From: John D'Errico on 6 May 2008 09:34 "Bruno Luong" <b.luong(a)fogale.fr> wrote in message <fvpjh6$sn5$1(a)fred.mathworks.com>... > Quite interesting problem. I'm not so sure as John that the > solution does not exist. If you suppose probability > distribution of R=(x1,x2) depends only on |R| (thus in your > case the points are distributed on a disk rather than on a > rectangle), the pdf f(r) of |R| must verifies some integral > equation that I believe there exists a solution. The > integral equation get quit messy with the border, and I'm > too lazy to write it out. If someone is willing to tackle, > feel free to do so. > > Bruno Oh, I'm quite comfortable with the idea that an exact solution cannot exist on the domains we have been discussing, especially if you allow the points to lie strictly inside that domain. As you approach the diameter of the domain, the distance distribution must suffer some edge effects, even for a circular domain. Even for a circular domain, simplest is to force all the points to lie on the outer edge of the circle. This will result in a nearly uniform distance distribution, since we don't have the radius issue creeping in. But even that suffers from a subtle problem. For example, t = linspace(0,2*pi,2000)'; xy = [cos(t),sin(t)]; d = sqrt(bsxfun(@minus,xy(:,1),xy(:,1)').^2 + ... bsxfun(@minus,xy(:,2),xy(:,2)').^2); hist(d(:),200) Note that at any positive distance less than the diameter, there are exactly two points at that distance from any given location. Even for points that lie uniformly spaced on a straight line segment, the distance distribution will be triangular, not uniform. The edge effects still dominate. x = linspace(0,1,2000)'; d = pdist(x); hist(d(:),500) John
From: Bruno Luong on 6 May 2008 12:40 John, I just wonder in which limit one can rigorously extrapolate a thinking from a discrete data to a continuous pdf of a random variable. Let's simplify the problem first. Do you think in 1D there is still no solution? (your logical seems to hold in 1D) Bruno
From: John D'Errico on 6 May 2008 12:42 Here is an interesting sampling scheme on the unit circle. Its not exactly uniform in distance, but it is far closer than many others. It is surely not a good sampling of the complete domain. t = rand(1000,1)*1.01*pi; xy = [cos(t),sin(t)]; d = pdist(xy); hist(d(:),500) John
From: John D'Errico on 6 May 2008 13:36 "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <fvq1or$65s$1(a)fred.mathworks.com>... > Here is an interesting sampling scheme on the > unit circle. Its not exactly uniform in distance, > but it is far closer than many others. It is > surely not a good sampling of the complete > domain. > > t = rand(1000,1)*1.01*pi; > xy = [cos(t),sin(t)]; > d = pdist(xy); > hist(d(:),500) > > John Its is possible that a more fractal scheme might produce a nearly uniform distance distribution, as well as fill the domain of interest better. t = rand(2000,1).^0.2; xy = [t.*cos(t*2.5*pi),t.*sin(t*2.5*pi)]; subplot(1,2,1) plot(xy(:,1),xy(:,2),'r.') d = pdist(xy); subplot(1,2,2) hist(d(:),500) Have fun, John
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: a question about angle in solve Next: Bloated files when saving large variables to .mat files with -append |