a <- 1:1000
b <- 1:1000
AB <- outer(1 - 2 * ((a > 250) & (a < 750)), 2 * ((b > 250) & (b < 750)) - 1, "*")
d <- outer(a, b, "-")
ABvec <- as.vector(AB)
dvec <- as.vector(d)
out <- aggregate(x = ABvec, by = list(dvec), FUN = mean)
dvals <- out[ , 1]
corrs <- out[ , 2]
plot(dvals, corrs, type = "l", xlim = c(0, 1000)
lines(dvals, -cos(pi * dvals / 500), col = "magenta")
gill1109 wrote:The curve is, I believe, piecewise quadratic.
- Code: Select all
a <- 1:1000
b <- 1:1000
AB <- outer(1 - 2 * ((a > 250) & (a < 750)), 2 * ((b > 250) & (b < 750)) - 1, "*")
d <- outer(a, b, "-")
ABvec <- as.vector(AB)
dvec <- as.vector(d)
out <- aggregate(x = ABvec, by = list(dvec), FUN = mean)
dvals <- out[ , 1]
corrs <- out[ , 2]
plot(dvals, corrs, type = "l", xlim = c(0, 1000)
lines(dvals, -cos(pi * dvals / 500), col = "magenta")
jreed wrote:Perfect! Thanks for that explanation.
jreed wrote:Yes, you've rediscovered the hidden variable simulation. It produces the well known triangle shape that we talk about all the time.
FrediFizzx wrote:jreed wrote:Yes, you've rediscovered the hidden variable simulation. It produces the well known triangle shape that we talk about all the time.
The singlet vector really isn't a hidden variable. The point of that exercise went zoom... right over your head.
gill1109 wrote:FrediFizzx wrote:jreed wrote:Yes, you've rediscovered the hidden variable simulation. It produces the well known triangle shape that we talk about all the time.
The singlet vector really isn't a hidden variable. The point of that exercise went zoom... right over your head.
Dear Fred
I think that Jim Reed and I are both wondering what the point of your simulations are. Presumably you are trying to simulate some physics experiment. But which? ...
Return to Sci.Physics.Foundations
Users browsing this forum: ahrefs [Bot] and 84 guests